PDA

View Full Version : Where is the OpenGL code?



Bread
12-29-2009, 05:04 PM
Hi,

My understanding is that OpenGL itself is only library without defining of Framebuffer. So, with only OpenGL library, I can make fragment, but it cannot be drawn on a framebuffer since framebuffer is not defined.

So, GLUT, GLX, or WGL based on Operating System would make it work completely. Right?

If then, what if I want to make a similar one like GLUT/GLX/WGL? How can I get only OpenGL core library without GLUT/GLX/WGL?

Since I am very new to OpenGL, if there is missing point, please guide me correctly.

Thank you,

ZbuffeR
12-29-2009, 05:41 PM
Indeed, you got several things wrong.

OpenGL is an open standard that defines an API, to do (mainly 3D accelerated) graphics. However the implementations are not open, and developped separately by each 3D video hardware maker such as nvidia, ATI/AMD.

Before you "can make fragment", you must have a framebuffer, so you need something external to GL to create it. Down to the OS platform it can be GLX or WGL etc. GLUT use whichever is needed on the runtime platform.

Read that to get started on OpenGL programming :
http://www.opengl.org/wiki/Getting_started

Alfonse Reinheart
12-29-2009, 06:33 PM
To be more specific, OpenGL handles rendering and so forth. But the environment around OpenGL needs to be set up properly before you can actually use OpenGL.

For *NIX-based systems, GLX is used as the initialization system. On Windows machines, WGL is used.

GLUT is an abstraction library, designed to make OpenGL programming easier. It handles all of the environmental stuff (creating windows, making WGL/GLX calls to set up OpenGL, etc).

Bread
12-29-2009, 06:40 PM
Thank you for the great help, ZbuffeR.

So, OpenGL itself is implemented by hardware maker such as nVidia, ATI/AMD.

If I download the latest version of video driver, what would I get?

For example, if I use Win32, I assume that OpenGL32.dll is provided by Microsoft, and it is only wrapper of opengl. I guess the actual implementation of opengl is provided by ATI/AMD or nvidia. Is my understanding correct? (I read the part of http://www.opengl.org/wiki/Getting_started. (http://www.opengl.org/wiki/Getting_started))

That means that there is some interface standard between Microsoft and Graphic Chip Makers. Am I understanding right?

In Linux, when I download the latest version of graphic card, it includes XOrg (or XFree 4) with OpenGL library which made by GPU maker and GLX as well. Is that right? I refer to http://www.opengl.org/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib

Best Regards,
Bread

Alfonse Reinheart
12-29-2009, 06:44 PM
That means that there is some interface standard between Microsoft and Graphic Chip Makers.

Essentially, yes. OpenGL32.dll finds the actual OpenGL driver .dll and gets the OpenGL functions from it. It then acts as a thin intermediary between your application and the actual driver. That way, when you install your app on someone else's machine, you don't have to scan for the OpenGL driver yourself.

Bread
12-29-2009, 06:46 PM
Thank you, Alfonse Reinheart.

Now, I can understand GLX/WGL is provided by the GPU maker.

I still have some questions above, BTW.

Thanks,

Best Regards,
Bread

Bread
12-29-2009, 06:49 PM
That means that there is some interface standard between Microsoft and Graphic Chip Makers.

Essentially, yes. OpenGL32.dll finds the actual OpenGL driver .dll and gets the OpenGL functions from it. It then acts as a thin intermediary between your application and the actual driver. That way, when you install your app on someone else's machine, you don't have to scan for the OpenGL driver yourself.

OK. Thanks for the confirmation. I got it.

Thanks,