Jump to content
  • Advertisement
Sign in to follow this  
themisomagos

define quad coordinates

This topic is 3619 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

hello. i am trying to build a little first person shooter game. i am trying to load the target into the terrain so that they gradually rise up from the ground stay on the ground for 10 seconds and get back into the ground if they are not shot. i am loading the target.bmp and projecting it to a quad. first of all i would like to ask how is it possible to define the quads coordinates in which the target will appear.So let's say i want a target to appear in xpos=15.0 zpos=22.0 in my world coordinate system,how can i define that?

Share this post


Link to post
Share on other sites
Advertisement
what i actually want to do is put an image in a specific position in my world-coordinate system,and also be able to perform transformations to that image.

Share this post


Link to post
Share on other sites
Define 4 to 6 vertices with texture coordinates and the respective positions.
Bind the image texture.
Draw using GL_QUADS (4 vertices) or GL_TRIANGLES (2x3 = 6 vertices).

You could define the quad once in a display list (e.g. glBegin(GL_QUADS); ... ) and draw the list at every location you want. Just apply some translation/rotation before calling the list.

Share this post


Link to post
Share on other sites
what i am looking for is the way to specify the location that the display list will be drawn.i dont need the targets to have 4 sides.2 sides is ok.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!