One size Decal

Started by
4 comments, last by zohare 23 years, 10 months ago
How can I create a text decal or any 3d object whose size will remain fixed when I change the FOV or change its distance from the camera??
zohare
Advertisement
That''s easy,

just call glLoadIdentity();

then draw the 2d objects.



Justin Eslinger
~-=-=-=-=-=-=~~Justin Eslinger~~.."BlackScar"..~~-=-=-=-=-=-=~
Remember to push the camera and then pop it so you don''t lose your point of view...

    glMatrixMode(GL_MODELVIEW);glPopMatrix();// Draw fixed objects hereglPopMatrix();    


Your objects will be fixed and you won''t lose your point of view.

Programming is:A.The art of debugging a blank sheet of paper (or an empty file).B.A pastime similar to banging one's head against a wall, but with fewer opportunities for reward.C.The most fun you can have with your clothes on (although clothes are not mandatory).
Now I know what I'm made of, and I'm afraid of it...
Ooops.. sorry

It is:
    glMatrixMode(GL_MODELVIEW);glPushMatrix();  // Line modified <img src="wink.gif" width=15 height=15 align=middle>// Draw fixed Objects hereglPopMatrix();    


Push is to push the matrix on the stack. Pop will pop it out .

Programming is:A.The art of debugging a blank sheet of paper (or an empty file).B.A pastime similar to banging one's head against a wall, but with fewer opportunities for reward.C.The most fun you can have with your clothes on (although clothes are not mandatory).
Now I know what I'm made of, and I'm afraid of it...
that might have been the answer if I was using openGL, but D3D IM.
zohare
Duh!

Ok then you have to remember the view matrix (in a standard variable), push an identity matrix in the view matrix and then you draw your objects and reset the view matrix to that variable. If you are using 2d objects, just blit them on the back buffer just before switching to front. Wuhh! That was a long time ago for D3D

(( PS: I would choose Dx under windows because I think it is more polyvalent than just 3D, but since I''m working on different platform I just can''t. Entirely waiting for OpenML, though! Will be the best of the best! ))

Programming is:A.The art of debugging a blank sheet of paper (or an empty file).B.A pastime similar to banging one's head against a wall, but with fewer opportunities for reward.C.The most fun you can have with your clothes on (although clothes are not mandatory).
Now I know what I'm made of, and I'm afraid of it...

This topic is closed to new replies.

Advertisement