Opengl basecode in X.org - Xwindows

This is a discussion on Opengl basecode in X.org - Xwindows ; Hi I want to start re-learning OpenGL on my Linux desktop, but i dont want to use SDL/Wx/GLUT or any helper lib. How do i make Opengl blank window just like nehe.gamedev.net tutorials. (ie. http://nehe.gamedev.net/data/lessons....asp?lesson=01 ) There is some X ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Opengl basecode in X.org

  1. Opengl basecode in X.org

    Hi

    I want to start re-learning OpenGL on my Linux desktop, but i dont want to
    use SDL/Wx/GLUT or any helper lib. How do i make Opengl blank window just
    like nehe.gamedev.net tutorials. (ie.
    http://nehe.gamedev.net/data/lessons....asp?lesson=01)
    There is some X basecode but its like 7+ years old and won't compile on my
    Kubuntu Feisty.... Could you give me any page that provide some tuts ?
    (Funny thing that X and Opengl is open and i cannot find any tutorials) TIA

    PS. Sorry for broken English



    --
    Don't Stop Dancing.....

  2. Re: Opengl basecode in X.org

    On 2007-10-21, RumbaDancer wrote:
    >
    > I want to start re-learning OpenGL on my Linux desktop, but i dont want to
    > use SDL/Wx/GLUT or any helper lib. How do i make Opengl blank window just
    > like nehe.gamedev.net tutorials. (ie.
    > http://nehe.gamedev.net/data/lessons....asp?lesson=01)
    > There is some X basecode but its like 7+ years old and won't compile on my
    > Kubuntu Feisty.... Could you give me any page that provide some tuts ?
    > (Funny thing that X and Opengl is open and i cannot find any tutorials) TIA
    >
    > PS. Sorry for broken English


    I ripped out some code from my 3d engine and hacked a small example for
    you: http://nuclear.sdf-eu.org/tmp/glx_example.tar.gz

    Some parts could be a bit simpler, like for instance you could use
    XMatchVisualInfo() instead of trying out various visuals in a loop, or
    you could avoid dealing with video mode changes, which would avoid all
    the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    But anyway, hack it anyway you like.

    --
    John Tsiombikas (Nuclear / Mindlapse)
    http://nuclear.sdf-eu.org/

  3. Re: Opengl basecode in X.org

    John Tsiombikas wrote:>
    > On 2007-10-21, RumbaDancer wrote:
    > >
    > > I want to start re-learning OpenGL on my Linux desktop, but i dont want to
    > > use SDL/Wx/GLUT or any helper lib. How do i make Opengl blank window just
    > > like nehe.gamedev.net tutorials. (ie.
    > > http://nehe.gamedev.net/data/lessons....asp?lesson=01)
    > > There is some X basecode but its like 7+ years old and won't compile on my
    > > Kubuntu Feisty.... Could you give me any page that provide some tuts ?
    > > (Funny thing that X and Opengl is open and i cannot find any tutorials) TIA
    > >
    > > PS. Sorry for broken English

    >
    > I ripped out some code from my 3d engine and hacked a small example for
    > you: http://nuclear.sdf-eu.org/tmp/glx_example.tar.gz
    >
    > Some parts could be a bit simpler, like for instance you could use
    > XMatchVisualInfo() instead of trying out various visuals in a loop, or
    > you could avoid dealing with video mode changes, which would avoid all
    > the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    > But anyway, hack it anyway you like.


    Just a question: On a Linux desktop system, is OpenGL an alternative to the
    X server or is OpenGL a level higher and uses the X server for graphic
    primitives (I think only one system can install a driver for the graphics
    card)? If it is an alternative, can I then only either execute programs
    written for X or for OpenGL and never both types of programs on the same
    Linux desktop system?

  4. Re: Opengl basecode in X.org

    John Tsiombikas wrote:

    > I ripped out some code from my 3d engine and hacked a small example for
    > you: http://nuclear.sdf-eu.org/tmp/glx_example.tar.gz
    >
    > Some parts could be a bit simpler, like for instance you could use
    > XMatchVisualInfo() instead of trying out various visuals in a loop, or
    > you could avoid dealing with video mode changes, which would avoid all
    > the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    > But anyway, hack it anyway you like.
    >


    Big thx man.... but

    gfx.c:18:38: error: X11/extensions/xf86vmode.h: No such file or directory

    system kubuntu x.org 7.2

    what could be wrong.... am i missing some libs ?

    adrian@slayer:/usr/include/X11/extensions$ ls | grep x
    extutil.h
    lbxbuf.h
    lbxbufstr.h
    lbxdeltastr.h
    lbximage.h
    lbxopts.h
    lbxstr.h
    lbxzlib.h
    panoramiXext.h
    Xext.h
    Xfixes.h
    xfixesproto.h
    xfixeswire.h
    XLbx.h
    xtestext1.h
    xteststr.h


    adrian@slayer:/usr/include/X11/extensions$ ls | grep X
    panoramiXext.h
    panoramiXproto.h
    Xag.h
    Xagsrv.h
    Xagstr.h
    Xcup.h
    Xcupstr.h
    Xdbe.h
    Xdbeproto.h
    XEVI.h
    XEVIstr.h
    Xext.h
    Xfixes.h
    XI.h
    Xinerama.h
    XInput.h
    XIproto.h
    XKBgeom.h
    XKB.h
    XKBproto.h
    XKBsrv.h
    XKBstr.h
    XLbx.h
    Xrandr.h
    Xrender.h
    XShm.h
    XTest.h


    Plz help
    --
    Don't Stop Dancing.....

  5. Re: Opengl basecode in X.org

    John Tsiombikas wrote:

    > Some parts could be a bit simpler, like for instance you could use
    > XMatchVisualInfo() instead of trying out various visuals in a loop, or
    > you could avoid dealing with video mode changes, which would avoid all
    > the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    > But anyway, hack it anyway you like.
    >


    ok after changing few \" i finally managed to compile code from SGI.com

    http://techpubs.sgi.com/library/tpl/...html/ch03.html

    so my machine isn't *that* broken :-).
    but i would be VERY happy if i could see your code from engine. (looks more
    proffesional).
    --
    Don't Stop Dancing.....

  6. Re: Opengl basecode in X.org

    John Tsiombikas wrote:


    > Some parts could be a bit simpler, like for instance you could use
    > XMatchVisualInfo() instead of trying out various visuals in a loop, or
    > you could avoid dealing with video mode changes, which would avoid all
    > the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    > But anyway, hack it anyway you like.
    >


    i also found this:
    http://csourcesearch.net/data/package/vmapj/glxsimple.c
    code comiples and produces some nice shapes... :-)
    is it good enough to use in big projects... ?

    --
    Don't Stop Dancing.....

  7. Re: Opengl basecode in X.org

    On 2007-10-23, RumbaDancer wrote:
    >
    > John Tsiombikas wrote:
    >
    >> I ripped out some code from my 3d engine and hacked a small example for
    >> you: http://nuclear.sdf-eu.org/tmp/glx_example.tar.gz
    >>
    >> Some parts could be a bit simpler, like for instance you could use
    >> XMatchVisualInfo() instead of trying out various visuals in a loop, or
    >> you could avoid dealing with video mode changes, which would avoid all
    >> the XRandR / Xf86vm crap (actually Xr&r is beautiful, xf86vm is fugly).
    >> But anyway, hack it anyway you like.
    >>

    >
    > Big thx man.... but
    >
    > gfx.c:18:38: error: X11/extensions/xf86vmode.h: No such file or directory
    >
    > system kubuntu x.org 7.2
    >
    > what could be wrong.... am i missing some libs ?


    My code uses the XF86VidMode extension to switch resolutions in
    fullscreen mode, as a fallback, if the Xrandr extension isn't supported
    (or compiled).

    Obviously you just don't have the headers for the XF86vidmode extension
    library. Either disable it in my code by commenting out the #define
    USE_XF86VM in gfx.h, or install the library:

    sudo apt-get install libxxf86vm-dev


    --
    John Tsiombikas (Nuclear / Mindlapse)
    http://nuclear.sdf-eu.org/

  8. Re: Opengl basecode in X.org

    On 2007-10-23, Herbert Kleebauer wrote:
    > Just a question: On a Linux desktop system, is OpenGL an alternative to the
    > X server or is OpenGL a level higher and uses the X server for graphic
    > primitives (I think only one system can install a driver for the graphics
    > card)? If it is an alternative, can I then only either execute programs
    > written for X or for OpenGL and never both types of programs on the same
    > Linux desktop system?


    It's not an alternative, it is tied to the X window system through the
    GLX extension of the X window system. OpenGL drawing takes place inside
    of X drawables (Window / Pixmap).

    A hardware implementation of OpenGL on X11, will not use X11 primitives
    for drawing. It'll talk to the graphics driver (for instance on the PC
    platform through DRI, on SGI machines through /dev/opengl, etc).

    A software implementation obviously will use X11 drawing.

    --
    John Tsiombikas (Nuclear / Mindlapse)
    http://nuclear.sdf-eu.org/

  9. Re: Opengl basecode in X.org

    John Tsiombikas wrote:

    > On 2007-10-23, RumbaDancer wrote:
    >>


    > My code uses the XF86VidMode extension to switch resolutions in
    > fullscreen mode, as a fallback, if the Xrandr extension isn't supported
    > (or compiled).
    >
    > Obviously you just don't have the headers for the XF86vidmode extension
    > library. Either disable it in my code by commenting out the #define
    > USE_XF86VM in gfx.h, or install the library:
    >
    > sudo apt-get install libxxf86vm-dev


    oh yes... now running.... tell me... where did you learn that from... any
    book or online tuts... ? (or years of coding ?:-)
    --
    Don't Stop Dancing.....

  10. Re: Opengl basecode in X.org

    On 2007-10-23, RumbaDancer wrote:
    >
    > John Tsiombikas wrote:
    >
    >> On 2007-10-23, RumbaDancer wrote:
    >>>

    >
    >> My code uses the XF86VidMode extension to switch resolutions in
    >> fullscreen mode, as a fallback, if the Xrandr extension isn't supported
    >> (or compiled).
    >>
    >> Obviously you just don't have the headers for the XF86vidmode extension
    >> library. Either disable it in my code by commenting out the #define
    >> USE_XF86VM in gfx.h, or install the library:
    >>
    >> sudo apt-get install libxxf86vm-dev

    >
    > oh yes... now running.... tell me... where did you learn that from... any
    > book or online tuts... ? (or years of coding ?:-)


    All of the above
    However that piece of code, doesn't do anything profound. Just uses well
    defined programming interfaces (Xlib and X extensions). There's
    documentation describing all of that.

    --
    John Tsiombikas (Nuclear / Mindlapse)
    http://nuclear.sdf-eu.org/

+ Reply to Thread