Jump to content
  • Advertisement
Sign in to follow this  
NeWbY

lesson 6 - no picture shows on the box ?

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

If someone could take a look at the source on the following url and could tell me why it doenst shows the picture (compiled with visual studio 2005) i appreciate it. The picture is in the map Data (which is in the same map as the compiled executable). source files:
http://www.tbns.net/paul100/glwindow.zip

Share this post


Link to post
Share on other sites
Advertisement
You need to enable texturing before any calls to textured objects using glEnable(GL_TEXTURE_2D), if you then want to draw some untextured objects then call glDisable(GL_TEXTURE_2D) and draw them. Remember that OpenGL is a state machine and anything that you set will stay the same until you implicitly change it.

So in your main.cpp where you say
glBindTexture(GL_TEXTURE_2D, window.texture[0]);
you should be using
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, window.texture[0]);
instead.

Hope that helps.

Share this post


Link to post
Share on other sites
Thanks for your reply, that worked somehow someway. Also, what do you recommend learning first, OpenGL or DirectX ?

Share this post


Link to post
Share on other sites
I would recomend learning openGL first.
Simply because when you know it, you will know the true nature of realtime 3d graphics.
I know way to may persons that works professionally on DX and doesn't know how realtime 3d graphics work (ever played "Traitors gate 2:cypher").
I beleve this is because DX encapsulates a lot of the things that openGL does not, thus sheilding the user from a valubale learning experience.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!