Jump to content
  • Advertisement
Sign in to follow this  
PhoenixByte

OpenGL How to enable user to change the texture used?

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

Hi, I've been trying to enable my OpenGL app to accept user input to change the texture displayed in them. But after succeeding in compiling the request for user input via the usual cin and cout, my app just straight on displayed the default texture without requesting for user input. Did I do something wrong? Or cin and cout is not applicable in an openGL app?

Share this post


Link to post
Share on other sites
Advertisement
*calls apon the spirits to gift 'im with magical ability to guess at peoples code*

well, that doesnt seem to have worked..
so, do you have a console to input the text into?
did you use the debugger to even see if that code is executed?
did the texture loading code get the right file name?
does it load properly?
does it bind to a texture properly?
are you using the right texture ID when displaying?
and i'm spent..

Share this post


Link to post
Share on other sites
When making the project, i chose WIN32 Application and not Console Application.

Should I add a dialog to my application now? Or add / change my project to be a console application?

Share this post


Link to post
Share on other sites
If you want to use console i/o (like cin/cout) the easiest way is to make a console app. However if you are using a single thread you may want to think about what will happen to your ogl window while you are blocking waiting for input from the console. A message based input (like a dialog box) may be a better option.

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!