[newbie] How to create a window in X ? [sorry!]

Hi,

I’m new to Open GL, but not to programming in general (I program text solutions as a hobby in C/C++, Java etc) - but when it comes to GUI’s I go all …

Question is, what is the bare minimum I need to create a window in X?

I’ve got my nVidia drivers working great in Q3A and UT - but I don’t know about the header files…

How would I compile and link with the OpenGL libraries under gcc?

gcc me.c -o me <now what??>

Many Thanks!!

John

Originally posted by JCC:
[b]Hi,

I’m new to Open GL, but not to programming in general (I program text solutions as a hobby in C/C++, Java etc) - but when it comes to GUI’s I go all …

Question is, what is the bare minimum I need to create a window in X?

I’ve got my nVidia drivers working great in Q3A and UT - but I don’t know about the header files…

How would I compile and link with the OpenGL libraries under gcc?

gcc me.c -o me <now what??>

Many Thanks!!

John[/b]

1 ) bare minimum I need to create a window in X ?
Depends if you mean OpenGL or other type of windows. There are some tutorials in net. There are more than one way to do that easyly.

2 ) With NVIDIA drivers 1.xxx you get gl.h . You might also need mesa-devel package to get glut.h.

use locate command and check if you have them in your system.

  1. gcc -o me me.c -lGL -LGLU -lglut -> something like that , you might also need -lm or others .

go nehe.gamedev.net there are some easy tutorials. They are made for windows, but most of them are changed to linux also. get couple of them and try to make them.

also look at the makefiles , there you can see the compiler lines.

Thanks for the gcc libraries that I need to include

Do you know of any good tutorials that can teach OpenGL without any MS Windows specific stuff?

I looked at the nehe.gamedev.net and the whole first chapter mixes MS Windows calls with OpenGL calls, and I can’t tell which are which - any Linux/Unix OpenGL tutorials you know of?

Thanks!!

John

Originally posted by JCC:
[b]Thanks for the gcc libraries that I need to include

Do you know of any good tutorials that can teach OpenGL without any MS Windows specific stuff?

I looked at the nehe.gamedev.net and the whole first chapter mixes MS Windows calls with OpenGL calls, and I can’t tell which are which - any Linux/Unix OpenGL tutorials you know of?

Thanks!!

John[/b]

Hi

If you go down of page of your first polygon of nehes tutorials you find.

  • DOWNLOAD Linux/GLX Code For This Lesson. ( Conversion by Mihael Vrbanec )
    this uses GLX for OpenGL -> nvidia use that

  • DOWNLOAD Linux Code For This Lesson. ( Conversion by Richard Campbell )
    have not looked this one.

  • DOWNLOAD Linux/SDL Code For This Lesson. ( Conversion by Ti Leggett )
    Should also be OpenGL , have not look this one.

most of nehes tutorials are converted to linux. I am not sure how good the comments are but
you can use nehes windows example text to understand what programs is doing.

see also.
http://www.opengl.org/developers/code/tutorials.html http://www.opengl.org/developers/code/samplecode.html

some of these are linux compatible.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.