LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 01-31-2005, 04:36 PM   #1
theeil
LQ Newbie
 
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25
Blog Entries: 1

Rep: Reputation: 15
Question 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)?
 
Old 01-31-2005, 04:51 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
NeHe has lots of tutorials about openGL, and they have Linux SDL, and glx versions for most of the examples.
 
Old 01-31-2005, 05:05 PM   #3
theeil
LQ Newbie
 
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 15
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.
 
Old 02-01-2005, 05:49 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Have you got the SDL stuff installed properly? Perhaps the GLX way would be better for you.
 
Old 02-01-2005, 06:20 PM   #5
theeil
LQ Newbie
 
Registered: Aug 2004
Location: Canada
Distribution: gentoo, debian, slackware
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 15
that sounds good but i got even more errors when i tried that. same sort of stuff, just more
 
Old 02-01-2005, 06:46 PM   #6
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

Rep: Reputation: 44
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to get started with wifi on linux enigma_0Z Linux - Wireless Networking 13 11-25-2005 02:40 PM
Just started using linux... a few questions michael16 Linux - Newbie 1 06-24-2005 06:59 PM
Getting Started with Mandrake Linux? hastapronto Linux - Newbie 11 03-12-2005 09:06 PM
getting started with Mesa/OpenGL wuck Programming 7 12-11-2003 04:29 PM
how to get started with linux security mike@wales Linux - Newbie 6 05-27-2003 05:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration