|
|
#1 | |
|
Registered User
Join Date: Dec 2006
Posts: 4
|
I am trying to start 3D graphics programming on Linux, openSUSE 10.2 to be precise but have not found any tutorials to set up openGL libraries in linux.
I know its possible but I just can't do it somehow. I read up about SDL and how its similar to openGL and about MESA but I couldn't make much use of that. I have already got my nVidia 6800GS fully configured with the latest 96.31 drivers from nVidia. I checked up many openGL ebooks but they all start with setting up openGL windows in windows, even on http://nehe.gamedev.net/ I found nothing I could use ![]() So if someone could help me with this or even links to what I want to do that be real nice Thanks ![]() |
|
|
|
|
|
|
#2 | |
|
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
|
The nehe tutorials show how to use GLX / SDL on linux. Just download the GLX or SDL version of the tutorial (there are dozens of different downloads of each tutorial).
|
|
|
|
|
|
|
#3 | |
|
Registered User
Join Date: Dec 2006
Posts: 4
|
Quote:
I don't know how I did'nt see the GLX Base Code @ nehe :P But is there not a SINGLE standard for openGL in the X windows System ...I know its open source so thers no hard and fast rule but still in terms of speed what do most prefer......I mean I came across 4 extensions to openGL for the X windows System: SDL GLX GLUt Mesa3d Which is better in terms of speed out of all these ???? Speed is my primary concern now that I have all their Base Codes working thanks for this Thunderbird ![]() |
|
|
|
|
|
|
#4 | |
|
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
|
There are two different (actually more) OpenGL libraries for Linux. One is the libGL.so from Mesa which can be used for software rendering and which is used by most DRI drivers (radeon, intel, ..). Then you have the opengl libraries from Nvidia which ofcourse only work for Nvidia cards.
The 'standard' way for using OpenGL on Linux is by using X and glX calls (GLX is similar to WGL on Windows). When you use X/glX stuff your program is in general limited to UNIXes. For this reason lots of people use either glut or SDL for setting up OpenGL. These libraries abstract away the X/GLX stuff in a platform independant way. |
|
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Dec 2006
Posts: 4
|
Quote:
![]() Thanks mate ! you have made the decision for me......I am sure that I will be using GLUT ...... |
|
|
|
|
|
|
#6 | |
|
Registered User
|
I have been using SDL to great effect developing GL apps on both WIN32 and Linux platforms.
__________________
Gentoo |
|
|
|
|
|
|
#7 | |
|
Registered User
Join Date: Dec 2006
Posts: 4
|
Quote:
I was beginning to wonder if I should go ahead with GLUT because I know SDL is in a way better than GLUT because it allows you access to audio as well. But at the moment I just want to familiarize myself with openGL using the GLUT library but yeah using SDL later is very much on my mind. So I will check out some SDL tutorials from the NeHe website later when I am comfortable with using GLUT . Anyways I used this this HOW-TO to install GLUT http://www.linux.com/howtos/Nvidia-O...instglut.shtml . . . he problem is I dont know how to start on my first program. Now that my GL and GLU header files are where I want them..........should I follow any tutorial for openGL. . . . The tutorials available at NeHe are for use with windows because its code has the #include<window.h> directive.....So i was wondering how to use them with GLUT........should I just remove this header file ??????? PS: Sorry for the noobness and the bolding of the text but I desperately need some help ![]() |
|
|
|
|
|
|
#8 |
|
Registered User
|
Hi again. The nehe tutorials are a good and satisfying way to get started with opengl. GLUT is crossplatform however it is obvious that the glut version of lesson 02 was written for windows. There is not very much learning associated with the various ways of aquiring a GL context you may still wish to look into SDL it will save you some hassle getting the examples to compile
![]() To get it to work in linux change the includes from: #include <windows.h> // Standard Header For Most Programs #include <gl/gl.h> // The GL Header File #include <gl/glut.h> // The GL Utility Toolkit (Glut) Header To: #include <stdlib.h> // defines exit #include <GL/gl.h> // The GL Header File #include <GL/glut.h> // The GL Utility Toolkit (Glut) Header Then change the return type of "main" from void to int tsk-tsk. Now simply compile like so: $ g++ lesson2.cpp -lGL -lGLU -lglut And run like so: $ ./a.out tada ![]()
__________________
Gentoo |
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| (Linux) NVIDIA R302.11 OpenGL Extensions List | News | Latest Tech And Game Headlines | 0 | 06-12-12 07:30 AM |
| nVidia Linux drivers with Linux on Mac, help? | Thetargos | NVIDIA Linux | 0 | 05-13-12 12:52 PM |
| 302.07 (beta) for Linux x86/x86_64 released | AaronP | NVIDIA Linux | 0 | 05-02-12 09:55 AM |
| My UT2003 Tweak Guide | DXnfiniteFX | Gaming Central | 48 | 10-30-02 11:59 PM |
| linux opengl extension | chijacky | NVIDIA Linux | 5 | 08-23-02 11:16 AM |