Jump to content
  • Advertisement
Sign in to follow this  
gila kid

OpenGL Project

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

I am thinking that to run a OpenGL program the source code must be in a OPenGL project?? Becuase as soon as I opened my source code in a opengl project it ran just fine. Haha..thats funny and I spent so much time becuase of that! Holy Cow..

Share this post


Link to post
Share on other sites
Advertisement
Hmmm...I'm not even sure what an 'Open GL' Project is? Are you using a Microsoft Compiler?

When I make Open GL Apps (very rarely)..I think I just create a basic console App, and then link in the required libraries and include the proper header files. The compiler will normally help you out as well (as in tell you what you're missing).

ArchG

Share this post


Link to post
Share on other sites
What compiler are you using? Dev-C++? Remember that OpenGL contexts are tricky to set up in C++ for Windows unless you are setting it up with SDL (which makes your code more portable as well).

Share this post


Link to post
Share on other sites
I think what he means is a project thats set up in advance for openGL, code::blocks, an dev-c++ both have one.

Basically I think the problem comes down to you not linking the proper libraries.

Share this post


Link to post
Share on other sites
Quote:
Original post by samuraicrow
What compiler are you using? Dev-C++?


i think this has been said very often but dev-c++ is not a compiler its an IDE, and comes with an compiler.

Share this post


Link to post
Share on other sites
No I had the right files linked into my project settings(Parameters Tab). Yes, I am using DevCpp. I didn't realize this until I ran an openGL program. I noticed that my program(the source code for it) would then run. So i finally figured out that the source code would run only if I selected a GLUT project. THere is a openGL and a GLUT. I don't understand the difference. It runs in GLUT and not in openGL but its openGL code.??
ANy help would be appreciated...
thank you everyone...

-Cole

Share this post


Link to post
Share on other sites
Hi, I just checked, the OpenGL project template in Dev-C++ uses Win Api code. What are you using to set up a rendering context or to create a new window? OpenGL does not do that by itself. It is possible that you are using SDL, which means you will have to link to the libraries
-lSDLmain 
-lSDL
(pass as command line parameters) and include the SDL.h header file.

Share this post


Link to post
Share on other sites
GLUT stands for "OpenGL Utility Toolkit", which is a library for writing window system independent OpenGL programs.

Usually, the Operating System supports the UI including windows, look & feel...
However, the GLUT library allows you to create UI for your OpenGL programs on different platforms such as Windows, Linux...

- Black attack

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!