Crossfading screens...

Started by
14 comments, last by Ninkazu 20 years, 11 months ago
Oups, wrong link : Nehe productions
Advertisement
I''ve read many of the NeHe tutorials, but they just haven''t sunk in yet. The thing I just want to ask is.... I can''t have a fullscreen picture? It doesn''t have to be a texture, but just... a picture.
Sayonara!~Ninkazu
Rendering plain images in OpenGL is possible, but its usually slow. Textured quads are generally much faster. Your best bet, if you want to avoid complication, is to create a 1024x512 texture and only use the bottom left 640x480 pixels when you render the quad. All decent graphics cards support texture sizes up to 2048x2048 anyway

[edited by - benjamin bunny on May 3, 2003 10:51:56 PM]

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

OpenGL is ***VERY*** simple.
The only thing harder its to initiate all the shit. Like OpenGL windows, pixel format, loading texture fonction. After that, its very simple to make all effects you want. After that your crossfade will be easy to make. ogl is the simples way to make the effect you want. DirectX is more complicated and in software probably very hard and very slow.
DirectX in software is actaully better than OpenGL in software under Windows. As far as harder in software, there really is no difference in the code as far as I know.

Another way to handle a 640x480 image is to break to up into mipmaps. I can''t give you specifics on this, and since you seem to be rather new it would probably be best to just use a power of 2 texture bigger than what you need.

If you intrested in the mipmap solution though, I''m sure somebody on this forum can explain it much better than I could.
Alpha blending in software is one of the simplest thing to do: there are a lot of java demos that use alpha blend via software and they run at a decent speed...in C (and _asm) the things go better of course (I''ve tried both)!
To get an idea, an alpha blend with RGBA 256x256 images will take no more than 2-4 ms to be rendered (in good code). So it is not fast as a 3D HW but not so slow!

We know that DX goes faster than OpenGL in software...the difference is that OpenGL is a graphic library
However, in pure software, D3D/OpenGL are too slow to be used as a 2D renderer(perform a lot of mults and divisions to draw a bitmap is not wise).
DirectDraw is simply a set of ''memcopy'' functions and if you want to do a serious 2D effect you must implement it by yourself.


To Ninkazu: if you want to perform a fast alpha blending on screen between two images and you are sure to use 3DHW use OpenGL (simple&fast solution).

This topic is closed to new replies.

Advertisement