Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Why do I get this effect and how can I stop it?

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

Ok I am creating a simple walk around game and right now I got everything going for the exception of this wired effect. Image and video hosting by TinyPic I know it looks in front, but the triangle looking yellowish object is behind the rectangle. How do I get rid of this? Here is the code: //start to draw floor glBindTexture(GL_TEXTURE_2D, textureId2); glEnable(GL_TEXTURE_2D); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glBegin(GL_TRIANGLES); glTexCoord2f(5.0f, 0.0f); glVertex3f(10.0f, 0.0f, 0.0f); //bottom, left glTexCoord2f(0.0f, 9.0f); glVertex3f(0.0f, 10.0f, -40.0f); //bottom, right glTexCoord2f(0.0f, 7.0f); glVertex3f(-10.0f, 0.0f, -40.0f); //top, right glEnd(); glDisable(GL_TEXTURE_2D); glutSwapBuffers(); }

Share this post


Link to post
Share on other sites
Advertisement
Thanks that worked! Also since I want to save some time and go off topic for a second is. How can I hide the mouse cursor on my 3d area then just the hole window?

Thanks, ajm113.

Share this post


Link to post
Share on other sites
I already tried that but that hides the mouse on the hole window! I just want the mouse to be hidden on the 3d rendering area.

Share this post


Link to post
Share on other sites
You could always render your own cursor, and just hide it when it's not overlapping a "2D area".

Share this post


Link to post
Share on other sites
Quote:
Original post by ajm113
I already tried that but that hides the mouse on the hole window! I just want the mouse to be hidden on the 3d rendering area.


The quick & dirty way would probably just be to handle the WM_MOUSEMOVE message in your WindProc, and hide/show the cursor with ShowCursor whenever it enters/leaves the rendering area.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!