Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

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

  1. #1
    Guest

    [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

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    Helsinki, Finland
    Posts
    25

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

    Originally posted by JCC:
    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
    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.

    3) 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.

  3. #3
    Guest

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

    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

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    Helsinki, Finland
    Posts
    25

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

    Originally posted by JCC:
    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
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •