Sign in to follow this  
NeWbY

lesson 6 - no picture shows on the box ?

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

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