Jump to content
  • Advertisement

Archived

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

Neandrake

3D world

This topic is 5806 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''ve been following a few of the tutorials on www.gametutorials.com for opengl and I have a 3d world. Basically for now it consists of five pyramid figures and a grid along the x and z axis and the constant y value is 0. I changed the perspective of the camera so that you are in the positive y region and looking down at the flat grid. I was wondering how to add a mouse for the user to move around. I know you have to make a jpg file and load it at the cursor point, but I''m confused at how to add a 2d mouse in a 3d world and facing a different direction because you''re looking down. I did some searching and found sample code that did some overlaying to add a mouse made from triangles, but there''s something in the code I don''t understand. The sample code is at: http://www.geocities.com/SiliconValley/Lakes/7220/pointer.html I only have two questions. In the BeginOverlay, the gluOrtho2d() function has Engine.h and Engine.w and I don''t know wtf those are. Also, in the EndOverlay() function, shouldn''t it enable everything that was disabled in the BeginOverlay function? Maybe I should go about this another way. Because I want to have the mouse be able to do selections by running a ray from the mouse straight down the y axis and determine if it hit anything(that''s another subject). But I''m still interested in overlaying. What exactly is it? Any help appreciated -chris

Share this post


Link to post
Share on other sites
Advertisement
I have a VERY limited knowledge of openGL, but I once overlayed 2d functions on 3d in openGL. (I needed a FPS counter to display) I think I rendered the triangles and then switched to orthographic mode and rendered the 2D. I don''t really remember.

- Twisted Matrix

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!