View Full Version : Q:GLSL Compilation and OpenGL 2.0 !

01 January 2006, 02:57 AM
Hi, my OS is WinXP sp2, my graphics card is Nvidia Gefore 5600XT. So what need i do to use openGL 2.0, i hear that it doesn't ship with WinXP.

01 January 2006, 08:05 AM
Oh my god, the demo about GLSL is great !
Please tell me how can i compile it, or exactly how can i begin with it. I have the book "OpenGl Shading language", i can understand it but cannot compile source code in this book because i don't know what .h (include file) do i need to include, what .lib file do i need to link !
Helllllllppppppppppp meeeeeeeeeeee ! :D

01 January 2006, 03:57 PM
OpenGL libraries for Win32 have not been updated for quite some time now, and there's no direct support for HLSL. You can't link statically with the functions needed to manage HLSL, because these functions aren't part of any .lib provided for Win32 platforms.
You have to check if your video card driver supports the requested gl functions then query their adress at run-time. wglGetProcAddress() returns the addresses where the requested functions were mapped when the video card driver was loaded in your process, provided such a function exists.
This document explains the process with a sample code (on p.4-8):
It's about nVidia's vendor specific extensions, but it works the same with ARB extensions.

If you want access to all OGL2.0 functions, it will become quite tedious and consume ressources though (there are a lot not included in opengl32.lib), but there's no other way to do it with windows.
Also, check for similar posts in this forum. The subject pops up regularly.

01 January 2006, 03:59 PM
Hi, my OS is WinXP sp2, my graphics card is Nvidia Gefore 5600XT. So what need i do to use openGL 2.0, i hear that it doesn't ship with WinXP.

That is correct, technically it does not ship on Windows XP. Instead it is found on the nvidia drivers for your card. Be sure you have your drivers up to date.

To load GLSL shader programs, you're going to need to use OpenGL extensions. Here is a link ( where to can start finding information on OpenGL extensions. These extensions include the ability to load, compile, and run GLSL shader programs.

Good luck, and feel free to come back here if you have more questions.

01 January 2006, 02:31 AM
Thank you very much. I did compiled my code yesterday, it run very well. I know how to use extension. Downloading render monkey and play with shaders.
One more thing i wonder is that those shader look very good, do you use those hardware shader for film ? I like anything relate to hardware rendering :thumbsup:

CGTalk Moderation
01 January 2006, 02:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.