Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-31-2005, 04:36 PM
|
#1
|
LQ Newbie
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25
Rep:
|
opengl/c++/linux getting started
Hi everyone. I know some opengl that I learned back when I used windows, but then converted to linux. I knew how to create a window and all that, without glut but now that I am set up with linux, I want to continue to learn OpenGL, but don't know how. does anyone have an example file to create a window with opengl enabled (I would like to stay away from GLUT and wxWindow)?
|
|
|
01-31-2005, 04:51 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
NeHe has lots of tutorials about openGL, and they have Linux SDL, and glx versions for most of the examples.
|
|
|
01-31-2005, 05:05 PM
|
#3
|
LQ Newbie
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25
Original Poster
Rep:
|
thanks, i tried that but with bordland c++ builder X (anjuta crashes when i create a project), i get 37 errors (lesson 4 - linux/STL) related to SOME of the functions and classes:
"main.cpp": main.cpp error: `SDL_Quit' undeclared (first use this function) at line 35
35: SDL_Quit( );
"main.cpp": main.cpp error: `SDL_Event' undeclared (first use this function) at line 196
196: SDL_Event event;
"main.cpp": main.cpp error: uninitialized const `SDL_VideoInfo' at line 198
198: const SDL_VideoInfo *videoInfo;
this sort of thing. any ideas? there were no errors related to header files.
|
|
|
02-01-2005, 05:49 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
Have you got the SDL stuff installed properly? Perhaps the GLX way would be better for you.
|
|
|
02-01-2005, 06:20 PM
|
#5
|
LQ Newbie
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25
Original Poster
Rep:
|
that sounds good but i got even more errors when i tried that. same sort of stuff, just more
|
|
|
02-01-2005, 06:46 PM
|
#6
|
Member
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Rep:
|
First off, you might need to include a relative pathname to the SDL header such as:
#include "/usr/include/SDL/SDL.h"
(keep in mind that this path might be different on your system, so just search for SDL.h)
then you need to be sure to make sure you tell g++ to build with the SDL libraries like so:
g++ -lSDL inputfilename.cpp -o outfilename
jrtayloriv
Last edited by jrtayloriv; 02-01-2005 at 06:49 PM.
|
|
|
All times are GMT -5. The time now is 01:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|