Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Derek Doucett

Special polygon question...

This topic is 6747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!