View Full Version : OpenGL Basic
03-16-2009, 12:50 PM
I know this question may sound quite wierd but I am really confused. Can somone please explain it.
We say OpenGL is an API. And as far as I know API does not provide implementations its just an interface. So how does we directly use this interface?
And when we say it is an implementation of OpenGL library. What do we mean by it? For e.g. Mesa 3D is supppose to be the Open source implementation of OpenGL API. So, How is it different from OpenGL. What extra things does an implementation provide?
Why should I use such implementation and not directly the OpenGL library?
I hope I could have framed my doubt better.
Please someone clear this doubt.
Thanks in advance
03-16-2009, 04:01 PM
as far as i understand, OpenGL consists basically on a specification. This specification tells what functions it should provide and what features it needs to support in order to be considered an OpenGL implementation.
OpenGL implementations then, take this specification and implement it. Implementations can be different implemented (lol) but they should all provide the same features to the "end user".
You can see an API as an interface to hardware. Every hardware can have different ways to do something. The API talks to the hardware driver and asks it to do stuff.
"Driver calls" can differ, so you have an standard API that takes care of translating your commands to the driver/hardware you are currently running.
I guess there is no "OpenGL library". They are all impmlementations of the OpenGL specification.
Maybe someone can give you a more detailed or technical explanation, however it should not be so far from this. Also anyone feel free to correct me if there's something wrong here.
03-16-2009, 06:07 PM
What about the OpenGL that we use?Isn't that implementation??Or I am getting it differently?
03-17-2009, 01:24 AM
This page explains it with good accuracy :
03-17-2009, 05:44 AM
openGL it's an interface that let every hardware vendor to create it's implementation of the driver.
"Why we use the hardware implementation and we don't use MESA?"
Because Mesa is a software implementation of oGL and all the rasterization, vertex tranformation and so on is done on the CPU.
Every hardware vendor provide a graphics chip and an implementation of openGL to use it effectively.
03-17-2009, 10:41 AM
So, does it mean when we call any opengl function it internally those function on the hardware?? How does the interaction happen?
03-17-2009, 11:10 AM
yes. Nothing to do on your side. Example on Windows, opengl32.dll serve as a dummy stub that forward gl calls to the actual GL implementation provided by graphic driver. If no other implementation exists, opengl32.dll provides a default sofware GL.
03-17-2009, 12:06 PM
And in similar context what does Mesa do??
03-18-2009, 01:48 AM
Mesa only provide a software implementation (to be precise some obscure cards get hardware support), but up to GL2.1 with GLSL shaders and a lot of extensions. Microsoft's opengl32.dll only provide 1.1 or 1.4 depending on the OS version.
03-18-2009, 02:09 AM
Zbuffer thanks a lot. I am really thankful to you for your effort. But still I am not quite clear. Can you please guide me to some other reading material that will help my understanding of mesa and all?
Thanks once again.
Apart from this, I want to render some of the mesa-demos in linux. I checked it out that the corresponding mesa-demos rpms are installed. But I don't know how to go about it? If you could guide me in that sense, it would be great.
03-18-2009, 02:47 AM
Browse the Mesa website, especially the FAQ, and have a look at the source : http://www.mesa3d.org/
About mesa demos, run the executables listed here :
04-08-2009, 10:01 AM
Hi, I read this post.
Its quite useful and informative to an extent for a newbie like me.
I've just started programming in iPhone. So I'm learning OpenGL ES (Embedded Systems)
Can anyone provide me with an insight into it?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.