Skip to main content
GameDev.net gamedev.net
🔒 Locked

Special polygon question...

Started by Derek Doucett Jun 23, 2000 at 3:38 PM 0 replies 900+ views
Original Post
Derek Doucett
Derek Doucett
I want to know how to set it up to draw a textured quad from the standard screen coordinates. Oh...and I'm using OpenGL :D Like...drawing a quad from (0,0)-(320,200) or something...so that it's drawn flat.. I'm thinking of this because I want to make a drop-down console, ala Quake. I already have the scripting done and everything. It's just a matter of drawing the menu gfx. - Derek Doucett Edited by - Derek Doucett on 6/23/00 8:30:01 PM
Tobias
Tobias
I have no idea what API you''re using, but using DX it''s really simple. Just use D3DTLVERTEX (vertices without transforming or lighting) and setup 4 vertices to your screen boundaries.

Here''s some code that does something similar

CColor col = CColor( 1,1,1 );
lpD3Ddevice->SetTexture( 0, GUITexture.GetSurface() );
v[0] = D3DTLVERTEX( D3DVECTOR( 2.0f, (vec_t)CurrentVideoHeight - GUIHeight, 0.0f ),
1, col.GetD3DRGB(),D3DRGB(1,1,1),0.0f,0.0f);
v[1] = D3DTLVERTEX( D3DVECTOR( (vec_t)CurrentVideoWidth - 2, (vec_t)CurrentVideoHeight - GUIHeight, 0.0f ),
1, col.GetD3DRGB(),D3DRGB(1,1,1),1.0f,0.0f);
v[2] = D3DTLVERTEX( D3DVECTOR( (vec_t)CurrentVideoWidth - 2, (vec_t)CurrentVideoHeight - 1.0f, 0.0f ),
1, col.GetD3DRGB(),D3DRGB(1,1,1),1.0f,1.0f);
v[3] = D3DTLVERTEX( D3DVECTOR( 2.0f, (vec_t)CurrentVideoHeight - 1.0f, 0.0f ),
1, col.GetD3DRGB(),D3DRGB(1,1,1),0.0f,1.0f);


Greets Tobias - http://come.to/polygone

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.