Sign in to follow this  

lesson 6 - no picture shows on the box ?

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

This topic is 4300 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this