Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: OpenGL vs MESA

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2010
    Posts
    28

    OpenGL vs MESA

    I was wondering why in the Linux world we must use MESA instead of OpenGL? Is MESA identical to OpenGL? Also, why is MESA behind in version numbers compared to OpenGL?

    thanks,
    mike

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,186
    Mesa3D provides an OpenGL implementation, just like NVidia's, AMD's, or Intel's drivers provide an OpenGL implementation. They are all OpenGL implementations. Like Ford, Buick, and Toyota are all types of cars.

    You don't have to use Mesa3D's OpenGL implementation. You can install another by installing your GPU vendor's driver, if they offer one. I personally use NVidia's on Linux. Works great!

    A separate issue is that Mesa3D also provides (in addition to an OpenGL implementation) their own version of the GLU OpenGL utilities library. You can use that irrespective of which underlying OpenGL implementation you choose to run. It's not tied to one or another (AFAIK).

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2010
    Posts
    28
    Quote Originally Posted by Dark Photon View Post
    Mesa3D provides an OpenGL implementation, just like NVidia's, AMD's, or Intel's drivers provide an OpenGL implementation. They are all OpenGL implementations. Like Ford, Buick, and Toyota are all types of cars.

    You don't have to use Mesa3D's OpenGL implementation. You can install another by installing your GPU vendor's driver, if they offer one. I personally use NVidia's on Linux. Works great!

    A separate issue is that Mesa3D also provides (in addition to an OpenGL implementation) their own version of the GLU OpenGL utilities library. You can use that irrespective of which underlying OpenGL implementation you choose to run. It's not tied to one or another (AFAIK).
    Ok, where do I get the nVidia implementation. I looked all over their site and all I see are .exe's.

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,186
    Google nvidia driver download and the link comes right up.

    Usually though you can just install it through your distro's package manager. Often that's simpler. Google your distros name + nvidia driver install for details.
    Last edited by Dark Photon; 11-04-2012 at 03:31 PM.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    16

    programming interface

    Quote Originally Posted by mikeglaz View Post
    Ok, where do I get the nVidia implementation. I looked all over their site and all I see are .exe's.
    (This isn't 100% accurate but it gets the point across)

    You wouldn't be trying to develop for a newer version of OpenGL are you?
    Trying to access new features, or maybe just worried about performance?

    It's the new version _development libraries_ you want isn't it?

    Well my friend it's GLEW you want!
    http://glew.sourceforge.net/

    This is a library that gives you entry points into the newer features of OpenGL such as the functions:

    glEnableClientState, glVertexPointer


    OpenGL itself is a specification to render fancy graphics to a video card.

    There are different implementations to it such as MESA, nVidia's OpenGL, ATI OpenGL, Microsoft OpenGL. Some of these such as MESA, are _software_ implementations. They do 3D rendering completely on your computer and do not take advantage of your fancy video card at all. Others like the nVidia, will take full advantage of the video card, the nVidia drivers will access the specific video card model and hand off the processing to it.

    Okay, easy enough right. Now why do you keep seeing MESA pop up, and why is your program so sloooow?

    on your computer you'll see windows/opengl32.dll, i believe this is the Microsoft _software_ implementation. Slow and it's probably the OpenGL 1.1 specification. It wont have any new functionality at all. Somewhere else you'll have a opengl.dll that comes from nVidia, this is the one you want.. but
    when you link opengl32.lib (microsoft visual c++) to your program, you are linking a static library, that accesses the dynamic library(opengl32.dll) that is the microsoft implementation. You don't want to do this. You want to link against a static library that will access the more modern opengl32.dll. GLEW is a multiplatform library written by opensource people, that will allow you to access new OpenGL features on any platform.

    You want to download and copy the .DLL filse to /windows/system32
    the library and include files to their respective folder in your compiler.

    Are you using Visual C++?

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2010
    Posts
    28
    Quote Originally Posted by dirk103 View Post
    (This isn't 100% accurate but it gets the point across)

    You wouldn't be trying to develop for a newer version of OpenGL are you?
    Trying to access new features, or maybe just worried about performance?

    It's the new version _development libraries_ you want isn't it?

    Well my friend it's GLEW you want!
    http://glew.sourceforge.net/

    This is a library that gives you entry points into the newer features of OpenGL such as the functions:

    glEnableClientState, glVertexPointer


    OpenGL itself is a specification to render fancy graphics to a video card.

    There are different implementations to it such as MESA, nVidia's OpenGL, ATI OpenGL, Microsoft OpenGL. Some of these such as MESA, are _software_ implementations. They do 3D rendering completely on your computer and do not take advantage of your fancy video card at all. Others like the nVidia, will take full advantage of the video card, the nVidia drivers will access the specific video card model and hand off the processing to it.

    Okay, easy enough right. Now why do you keep seeing MESA pop up, and why is your program so sloooow?

    on your computer you'll see windows/opengl32.dll, i believe this is the Microsoft _software_ implementation. Slow and it's probably the OpenGL 1.1 specification. It wont have any new functionality at all. Somewhere else you'll have a opengl.dll that comes from nVidia, this is the one you want.. but
    when you link opengl32.lib (microsoft visual c++) to your program, you are linking a static library, that accesses the dynamic library(opengl32.dll) that is the microsoft implementation. You don't want to do this. You want to link against a static library that will access the more modern opengl32.dll. GLEW is a multiplatform library written by opensource people, that will allow you to access new OpenGL features on any platform.

    You want to download and copy the .DLL filse to /windows/system32
    the library and include files to their respective folder in your compiler.

    Are you using Visual C++?
    I'm using gcc on Linux Mint 13. I do have an nVidia card. So will GLEW be hardware accelerated by my nVidia card?

  7. #7
    Junior Member Newbie
    Join Date
    Jun 2010
    Posts
    28
    ok, I compiled and installed GLEW using make and make install. But now how do I use it? Inside my Makefile I used the following for MESA:

    Code :
    objects = main.o
     
    cube: $(objects)
        g++ -o cube $(objects) -lX11 -lXi -lglut -lGL -lGLU -lm
     
    main.o: main.cpp
        g++ -c main.cpp

    Do I need to do something different? The GLEW page doesn't mention much.

  8. #8
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    16
    Quote Originally Posted by mikeglaz View Post
    ok, I compiled and installed GLEW using make and make install. But now how do I use it? Inside my Makefile I used the following for MESA:
    I'm not a %100 sure but try something like this:
    Try without the -lGL
    instead replace it with glew or maybe GLEW


    Code :
    objects = main.o
     
    cube: $(objects)
        g++ -o cube $(objects) -lX11 -lXi -lglut -lglew -lGLU -lm
     
    main.o: main.cpp
        g++ -c main.cpp
     
     
    Do I need to do something different? The GLEW page doesn't mention much.

  9. #9
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,186
    Quote Originally Posted by mikeglaz View Post
    ok, I compiled and installed GLEW using make and make install.
    The GLEW post muddied the waters a bit. GLEW is just wrapper library over the OpenGL implementation. You can use it or not. It's not required. And it has nothing to do with your Mesa vs. vendor driver OpenGL question.

    Suggest you get the NVidia driver installed first. glxinfo will confirm you have done so.

  10. #10
    Junior Member Newbie
    Join Date
    Jun 2010
    Posts
    28
    I'm not looking for a driver. I'm looking for an API to develop in. I noticed that OpenGL is on version 4.3 while Mesa is on 3.1. I know that on Windows I'm able to use version 4.3 with the libraries that come with Windows. So I was wondering if I could get version 4.3 on Linux? Does this make sense or am I asking the wrong question?

    mike

Posting Permissions

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