• Advertisement

Archived

This topic is now archived and is closed to further replies.

MESA vs. OpenGL

This topic is 5927 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
OpenGL. Mesa is just an OpenGL implementation with a few differences.
Just don''t concentrate on specific Mesa features.
For example, Quake uses OpenGL with a few fixes (#defined) for Mesa if the game is compiled in Linux.

---
Allow me to clear my head for once...
Stop polluting the air!

Share this post


Link to post
Share on other sites
Mesa is compliant with SGI''s OpenGL test suite. It just cannot be called OpenGL for licensing reasons.

Share this post


Link to post
Share on other sites
What everyone else is saying is that there is no such thing as simply OpenGL in linux. OpenGL is a standard that isn''t concerned with implementation. It is a set of software interfaces. MESA is an implementation of the OpenGL standard. You don''t have an option to use one over another in linux because MESA is pretty much your only option for using OpenGL in Linux. You could think of it like this. C/C++ are a standard and VisualC++ in windows and GCC in linux are implementations of that standard.

RandomTask

Share this post


Link to post
Share on other sites
Thanks for clearing some confusion I had about Opengl vs. Mesa.
I always thought that Mesa was a free ( as in free beer ) implementation of the OpenGL libraries, that OpenGL was a set of paid for ( as in paid for beer ) libraries. I didn''t know you have to pay just for a standard.

Share this post


Link to post
Share on other sites
Ok you just confused me, I have been reading posts and faqs for a few days now on both MESA and OpenGL for linux and what you said and what I have read dont match. I may be missing something, wouldnt be the first time but this is some of what I have been reading.

On MESA site:

Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or state machine, it is being used with authorization from Silicon Graphics, Inc. However, the author makes no claim that Mesa is in any way a compatible replacement for OpenGL or associated with Silicon Graphics, Inc. Those who want a licensed implementation of OpenGL should contact a licensed vendor.

While Mesa is not a licensed OpenGL implementation, it is currently being tested with the OpenGL conformance tests. For the current conformance status see the CONFORM file included in the Mesa distribution.


####################################################################
On OpenGL site:
OpenGL is on every platform
Ever wished that great Unix application would move to Windows or a great Windows game to Linux. Since OpenGL is fully cross-platform, it is realtively easy to port games or applications from one platform to be moved to another. This greatly expands the wealth of applications and games that support OpenGL.


Aside from these small blurbs from the websites the faqs on each page (mesa/opengl) have downloads for different librarys so I am pretty sure there IS a difference between MESA and OpenGL. So is there anyone that has used both that can tell me if there is an advantage to using one over the other for Linux programming? Thanks.



SDB - Whatever you do, dont press the red button!

Share this post


Link to post
Share on other sites
I'm not aware of anyone using SGI's OpenGL implementation on Linux so I guess I couldn't tell you. When I started OpenGL programming several years ago all there was on Linux was the Mesa libraries. On the Mesa site you'll see that they make those disclaimers. That is strictly for legal reasons. If you look deaper into the site you will see that the newest Mesa is fully compliant to the newest OpenGL standard.

I can't imagine how one would go about aquiring the SGI version. It must be a developer license to use their implementation and statically link it into your software. Check up on the licensing conditions. That may be the biggest difference between the libraries. I think that the Mesa one will allow any program to link to it and use it. I'm not sure if you can statically link to the program unless the software is free but I'm pretty sure you can.

I can say this: If you make sure that your program strictly uses OpenGL interfaces then no matter which implementation you decide to use ultimately, it shouldn't drastically affect your software. What will happen is that when your program makes an openGL call, it will dynamically link to the openGL module and connect to the proper interface.

I would recommend that you start with Mesa for doing your development since it is free and then benchmark your software using that implementation. Then pay for the SGI license and benchmark against that by removing the Mesa implementation and putting the SGI one on your system. That'll help you make your decision.

Hopefully that helped clean up some confusion. Just remember, there is the OpenGL standard set of interfaces and techniques and then there are implementations. On the outside all of the implementations should look the same. They should look like the OpenGL standard.

RandomTask

Edited by - RandomTask on November 20, 2001 4:44:04 PM

Share this post


Link to post
Share on other sites
ok, what''s there NOT to understand.

MESA is an implementation of OpenGL. meaning if you write OpenGL code, such as:


glBegin(GL_POINTS);
glColor3f(1.0f, 1.0f, 1.0f);
glVertex2f(0.0f, 0.0f);
glEnd();


and link this code to either an OpenGL library (i.e. OpenGL32.dll in Windows or opengl.a {i think} in Linux) then the functions "glBegin, glColor3f, glVerte2f, and glEnd" will be defined in both libraries and should behave the same.

so if you link your code with the MESA binary or the OpenGL binary it SHOULD work the same.

their claim that MESA is NOT a compatible replacement is simply legal jargon if some CLOWN tries something really wierd and discovers a bug in the MESA library.

now they may add or remove OpenGL functionality from MESA because it is NOT named OpenGL. where as if someone develops an OpenGL "driver" is must conform exactly to the OpenGL spec. i.e. include all OpenGL functions and extend functionality ONLY through the OpenGL extension mechanism.

if you still don''t get it: let''s i code a Windows replica (why i''d want to, i don''t know...). i can''t call it Windows, but for all intensive purposes i could make it work like Windows. thus it has Windows functionality, and can run Windows programs, but it''s NOT called Windows.

same deal.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
Thanks RandomTask, I get what you are saying and I found a page that explained the SGI license. I dont mean to sound dense but this is my first exposure to OpenGL, I was using MSVC++ and DX. The Linux system is still a bit confusing. Again thanks for the help.



SDB - Whatever you do, dont press the red button!

Share this post


Link to post
Share on other sites
You can download Nvidia drivers to get 3D hardware acceleration on linux as I understand it Then use xlib together with glx calls I think to set up the rendering context, window, etc. XFree86 website has a list of xlib function calls, there''s also a free online book on xlib. Or you could use mesa but I don''t know if it will hook up to nvidia drivers or instead use software library i.e. takes the slow path

Share this post


Link to post
Share on other sites
Wait, wait, wait.

You don''t really develop against OpenGL vs. Mesa under Linux. As long as you link dynamically, and don''t use a proprietary extension of one implementation or the other, they can be switched out on the end users system, by putting the libraries in the appropriate place.

It''s basically just a driver for people who can''t get a hardware accelerated OpenGL because of the type of card they''re using.

It''s the same way that OpenGL works under Windows. Microsoft distributes a software-renderer only OpenGL implementation, but if you have a card that can support hardware accelerated OpenGL, installing the drivers for the card replaces the OpenGL put there by MS with an implementation created by the card vendor. Likewise, you can also put the Mesa libraries in their place(compiled for Windows, of course), and use them instead, without very many glitches (I had to do this once on a machine that used an old (ick) Trident card).

So, you code for OpenGL, and rely on the user to have the correct libraries for their hardware (pointing them to Mesa and vendors, if you feel nice)
As far as hardware accelerated drivers for Linux, I know nVidia supplies a set, and some of the more expensive "workstation" class do as well. Mesa will accelerate for 3dfx (not very well, if I recall correctly). The SGI implementation is a software renderer (including source) that is meant to be used as an example for card vendors to base their drivers off of. The SGI implementation would not be used for production code, and probably isn''t of much interest to most of us (unless there are any video card designers in the audience).

I think the majority of the confusion comes from the fact that Mesa has to dance around calling themselves an OpenGL implementation (If I remember correctly, you have to pay a fair sum of money to officially be tested for compliance).
Hope this helps. In short, use whichever one works best for you, and let your players do the same.

Share this post


Link to post
Share on other sites

  • Advertisement