Jump to content
  • Advertisement
Sign in to follow this  
subharb

Something is not working

This topic is 4094 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 there, im new to Opengl, and i took a book from the library about Opengl This is the code that its written, its supose to make a window and stay fix, but what happens is that it dissapears, it doesnt stay at all! <source> #include <windows.h> #include <conio.h> #include <gl\gl.h> #include <gl\glaux.h> main(void) { auxInitDisplayMode(AUX_SINGLE | AUX_RGBA); //Le decimos que use una ventana de buffer unico //Y especificamos el color en base a Rojo, verde azul auxInitPosition(100,100,250,250); auxInitWindow(" Mi primera ventana"); getch(); } </source>

Share this post


Link to post
Share on other sites
Advertisement
It's a console program. You're supposed to run it from the console (i.e. the DOS prompt where you type the name of the exe to run it). You're double clicking it, i gather or just running it with F5 from your debugger.

Also, getch() is depreciated with Visual Studio 2005 so that may be why it's not working. Also, my 10second google on the subject seems to suggest that maybe it's not a blocking call?

You can try:

1) preferred - put a breakpoint at the end of the main() function and run it through the debugger
2) very very unpreferred use getchar() instead

-me

Share this post


Link to post
Share on other sites
U are right, but when i click it, it appears a message saying something like "Error while iniciating the application, Glaux.dll wasnt found, try the reinstalation of the application"

Share this post


Link to post
Share on other sites
To add more information..
Im using DEv-C, and i´ve never used glaux before, just because this books uses it, i downloaded the library, i put glaux.h in include folder, glaux.lib in lib folder, and glut32.dll in c:/windows/system, but still is not working.

Any idea, the message that appears is the one i wrote before...

Share this post


Link to post
Share on other sites
Well, like it says, you're missing GLaux.dll. If you have it, put it in the same folder as your application. If you don't, I'm not sure where to tell you to get it. GLaux was not been supported for a long time. I recommend finding a more up-to-date source for OpenGL self-education.

I also recommend finding and using an IDE other than Dev-Cpp. Consider Code::Blocks or MSVC++ Express. Both are free.

Share this post


Link to post
Share on other sites
If you use XP or higher you have to put *.dll files into your windows\system32 folder. Perhaps that might help

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!