LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   basic steps for opengl programming (https://www.linuxquestions.org/questions/programming-9/basic-steps-for-opengl-programming-67231/)

noir-gel 06-22-2003 09:33 AM

basic steps for opengl programming
 
Hello!

There is no info on internet!! I didn't find anything:

How can I find a tutorial for learning how to start an opengl program with linux, C++?

thanks!!!

kev82 06-22-2003 10:01 AM

nehe.gamedev.net, although his code is for windows there are linux/sdl linux/glx and glut ports that will be of use and all the actual opengl stuff is the same

noir-gel 06-22-2003 10:36 AM

thanks!
 
thanks!

anyway, i knew that page. the problem is that I'm not able to understand the difference between this terms:

sld,glx, glu, glut, opengl, mesa

I don't know what I'm using!!!

thanks for your time!!!!!!


.alvaro.castro.

kev82 06-22-2003 11:24 AM

the opengl api does not provide any windowing or input functions. it relies on functions in the operating system to create a window, set it up and handle input. so there are different api's for this 'house keeping' code. eg the windows platform supplies the wgl functions, the equivelent on X is the glx functions. but these are not easy for the beginner trying to concentrate on the concepts of 3d programming. sdl is an api to handle this sort of thing and comes with both windows & linux versions but ive never got it to work quite right. glut is a simple api that lets you get on with opengl without worrying about windowing and such but doesnt provide a great deal of flexibility.

glu is a library that is built on top of opengl to allow the easy drawing of quadrics and setting up of various matrices. mesa is a software implementation of the opengl api for ppl who dont have supported graphics cards.

so you need to choose an api to use with opengl that will take care of the basic stuff you need to do. for the beginner i suggest glut as it lets you concentrate on the 3d side of stuff while your learning. but by all means try sdl, most people say its great but i cant get it to handle events properly. i wouldnt bother with glx because it will just overcomplicate things while your learning.

if you google for glut tutorial im sure you'll find something about how to set it up, then you can read the nehe tutorials.

noir-gel 06-23-2003 05:03 PM

tHANKS
 
thanks for the explanation!!

.alvaro.castro.

Pres 06-24-2003 09:25 AM

Three helpful books for download
 
The "Red" book, a how to use Opengl book. Not bad at all.

The "Blue" book, details Opengl functions and data structures. Includes Openglu, "graphics library utilities". Really, this is the book.

Both of these can be found as online downloads in a number of formats, but if you want the latest editions, you'll need to buy them. I believe the downloadable versions are for Opengl 1.1 and current Opengl version is 1.3, unless 1.4 has been released. Ha ! A likely scenario. Both of these books have real names too. I'll leave those out though, to create suspense. They are always called the "Red" and "Blue" books so you won't need to know the real names.

I recommend using SDL. The documentation is good, the api is easy to use ... event handling always works for me *shrug* no dramas.

The book "Programming Linux Games" is also a damn good read, written by ex-Loki developers, big on SDL. It is availible for download free as well, if you need it. The official SDL documentation is extremely good too. SDL forums are thin, but I've rarely had need to post problems.

I've had pleasing results using SDL, Opengl (glu - don't need really, but some functions handy) and Openal (for sound).

So anyway, google up those books and download them, then look into SDL if you want to.


All times are GMT -5. The time now is 07:54 PM.