Archived

This topic is now archived and is closed to further replies.

joeyzt

Can i run OPENGL code from dev-c++

Recommended Posts

HI, I''ve decided to learn opengl. And i''m wanting to know if i can run it in dev-c++.? Also, take a simple opengl prog like this, http://www.eecs.tulane.edu/www/Terry/OpenGL/Simple_Example.html#A%20Simple%20Example it has the header file #include <gltk.h> which dev-c++ doesnt have, so whats the standard thing to do if you dont have a header file, is there a site that stores these? thanks.

Share this post


Link to post
Share on other sites
gltk.h is not a standard OpenGL header.

Since Dev C++ is built on top of GCC, you should be able to run anything you did in GCC.

That header has come from a custom package, so if you can find out where it came from, you might find a Dev C++ version of the library.

Check out http://nehe.gamedev.net/ for some great OpenGL tutorials. They all work in Dev C++.

EDIT: It looks like you are using Mesa OpenGL. Dev C++ comes with the standard OpenGL library. Try replacing gltk.h with gl/gl.h and gl/glu.h. You just have to use the OpenGL template and it will automatically include the GL libraries.



First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

[edited by - CaptainJester on July 7, 2003 8:45:58 AM]

Share this post


Link to post
Share on other sites
ok,

I''m on the first windows tutorial on the http://nehe.gamedev.net site.

seem to be missing the #include <gl\glaux.h> header now,

any ideas ?

Share this post


Link to post
Share on other sites
Unfortunatly, the first few tutorials were made when glaux was in use. You will have to do a search to find the glaux libraries.






First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

Share this post


Link to post
Share on other sites
well i found one on google whether its up to date or not i dont know, but i get loads of errors when i run the furst tutorial such as,


[Linker error] undefined reference to `glViewport@16''

[Linker error] undefined reference to `glMatrixMode@4''

Share this post


Link to post
Share on other sites
Hmm, perhaps you aren''t linking the OpenGL libraries.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by CaptainJester
Since Dev C++ is built on top of GCC, you should be able to run anything you did in GCC.


<SPAN CLASS=editedby>[edited by - CaptainJester on July 7, 2003 8:45:58 AM]</SPAN>


Technically that not accurate. DevC++ by, default, uses MingW as its compiler. Although MingW is the windows port of GCC.

Share this post


Link to post
Share on other sites
quote:
Original post by joeyzt
HI,

I''ve decided to learn opengl. And i''m wanting to know if i can run it in dev-c++.?

Also, take a simple opengl prog like this,

http://www.eecs.tulane.edu/www/Terry/OpenGL/Simple_Example.html#A%20Simple%20Example

it has the header file

#include <gltk.h>

which dev-c++ doesnt have, so whats the standard thing to do if you dont have a header file, is there a site that stores these?

thanks.


When I download Dev-C++ the OpenGL libraries game with it (either that or with MinGW compiler). Anyway you should be able to write and compile code that makes use of OpenGL in Dev-C++.

Share this post


Link to post
Share on other sites
are the sources for these tutorials free, in other words i can take the sorce mod it then its my own prog?

Share this post


Link to post
Share on other sites
hi again,


Say i want to add some text to a window created in opengl.

can i put standard c++ in there?


for ex.

can i add somethimg like


cout<<"hello";


i''m sure its more complex than that but just asking anyway,


Share this post


Link to post
Share on other sites