Advertisement

Questions about working in 2d

Started by March 11, 2002 09:08 AM
0 comments, last by Tanisjones 22 years, 11 months ago
Hi all, I''m working in a 3d car racing game, and I want to put in the screen the speed and a 2d bitmap of a minimap of the circuit. I have the 3d engine working fine, but now I don''t have no idea about how to put 2d bitmaps, fonts, etc. in the screen buffer before make the swap (I worked in glide before and there you wrote directly to the screen buffer, and here I think it can''t be done). Could anyone show me how to make this? I haven''t find the right tutorial to make this possible. Thanks in advance, Tanis.
I think what you''re looking for is orthographic projection. I would post some code but im late for a class..

But it goes something like this:

void DrawScene()
{
ClearDepthBuffer_etc();
SetupCameraMatrix();

Draw3dObjects();
LoadOrtho2D();
Draw2dObjectsToScreenCoords();
UnloadOrtho2D();

SwapBuffers(glDC);
}

This topic is closed to new replies.

Advertisement