Hello World ! I have problem regarding displaying a text which should not be affected by model view transformation...I have to display a cross-hair at the center screen for targetting enemies...when I put cross hair in the middle of center, it gets affected by some model view trasformation...as in pC game..scores are written either on RHS and LHS are not affected by camera rotation....how they do this ? Plz help me...somebody..anybody..???
pcgamer2008
0
Light Poster
Recommended Answers
Jump to PostYou could use two functions for drawing like this.
void RenderOverlay( GLenum mode ) { glViewport(0, 0, (GLsizei) WINDOW_WIDTH, (GLsizei) WINDOW_HEIGHT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glTranslatef(0,0,0); //dont actually have to do since it is default 0 //also have rotation at 0 ORTHO_WIDTH = ORTHO_HEIGHT*((GLdouble)WINDOW_WIDTH/(GLdouble)WINDOW_HEIGHT); glOrtho(0, ORTHO_WIDTH, 0, ORTHO_HEIGHT, -1, …
All 4 Replies
sfuo
111
Practically a Master Poster
pcgamer2008
0
Light Poster
sfuo
111
Practically a Master Poster
pcgamer2008
commented:
Showed me a light...thanks !!
+1
pcgamer2008
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.