PDA

View Full Version : Blocking



madman2
11-30-2000, 02:13 AM
I am making a tile-engine in OGL and I would like to know if there is a simple way to draw a sprite to the screen, aka blocking.
I have read http://nehe.gamedev.net/tutorials/lesson20.asp, but it takes 2 steps and I belive that there must be a simpler way.

I have also another question. In DirectX it is posible to skip the rasterizing process over by using a D3DTLVERTEX, and thereby giving the actual screen-coordinates. Can that be done i OpenGL?

Moz
11-30-2000, 09:10 AM
You can't skip the rasterizing process. In order to specify actual screen coordinates, you have to set the projection matrix accordingly (w/ glOrtho2D).
Then the fastest way to draw sprites is to use textured quads and textures (in texture objects) with alpha channels in combination with the alpha test to remove transparent pixels. (You should disable depth test, 1D texturing and fog when doing this in order to get the maximum speed).