PDA

View Full Version : Setting up development environment (Windows)



Jesper
03-29-2007, 02:54 PM
Hello, this is my first post on the forums here.

I'm setting up my development environment on Windows XP SP2, and I have a question. This is what I've done so far:

- Downloaded and installed Microsoft Visual C++ 2005 Express Edition (http://msdn.microsoft.com/vstudio/express/visualc/default.aspx) .
- Downloaded and installed the Microsoft Windows SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf&DisplayLang=en) .
- Followed these instructions (http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/) to integrate the Windows SDK with VC++ Express.

It all works fine, I can write, compile and run simple OpenGL programs with it.

Today I found this page: Moving Beyond OpenGL 1.1 for Windows (http://www.gamedev.net/reference/articles/article1929.asp) . So I've discovered that the OpenGL header files in the Windows SDK are only the version 1.1 header files... Now the method that that article describes to get access to OpenGL features of newer versions doesn't sound very convenient - I'd have to do that via extensions, dynamically finding the addresses of additional functions etc.

Are there OpenGL 2.0 header files anywhere that I can use instead of the Windows SDK header files? Would I need to download an SDK from ATI or nVidia to get these? I'd prefer vendor-independent header files... Doesn't OpenGL.org have generic OpenGL 2.0 header files?

Korval
03-29-2007, 03:05 PM
Any functions beyond GL 1.1 will need to be accessed via getting function pointers.

There are a number of extension loading libraries out there that will take care of the grunt-work.

MZIskandar
03-29-2007, 06:06 PM
hi jes,

solution 1. make sure that all the resource file (used by your program, eg. image, models, etc) are located at the right folder (usually the same folder of your compiled .exe file).

actually, whats the error message?

marshats
03-29-2007, 08:19 PM
Hello,

May I suggest using the handy OpenGL Extension Wrangler Library (http://www.opengl.org/sdk/libs/GLEW/) which is much more convenient than the the approach described in "Moving Beyond OpenGL 1.1 for Windows". This will give you access to all the openGL 2.0 functionality with a simple include and init call.

A good tutorial for installing GLEW on a windows box can be found at http://www.it.uu.se/edu/course/homepage/grafik1/ht06/assignments/opengl_windows.shtml

Jesper
03-29-2007, 10:13 PM
Thanks for the suggestions. Especially GLEW looks interesting. I'll try it out.

Originally posted by MZIskandar:
actually, whats the error message? No error message, I'm just wondering how to access OpenGL 1.2 and newer features in an easy way.

RigidBody
03-30-2007, 12:29 AM
Originally posted by Korval:
Any functions beyond GL 1.1 will need to be accessed via getting function pointers.is it so in windows? i'm programming in linux. i use the header files from nvidia; if i #define GL_GLEXT_PROTOTYPES before including the headers, i can use all functions without having to allocate any funtion pointers. no need to use GLEW.

(i know, i know...if someone with an older libGL would start the prog, it will crash. but i also know that my users do not have old libs ;) )

Kumar K
03-30-2007, 01:32 AM
Few things are missing in detail inside OpenGL wiki which can be easily understood by a new person picking OpenGL as their graphics library.
1) How OpenGL is developed in terms of Extensions.
2) What is Vendor and OpenGL compatibility via Extensions?
3) Some kind of Grid explaining... OS, OpenGL Version, Vendor1_ext_support, Vendor2_ext_support.
4) Advise to pick which glVersion or any wrapper lib, graphics card vendor, for different kinds of graphics applications keeping development costs in mind.
5) What’s there in Focus for future versions of GL.?

I guess wiki developers might have addressed all the above points, but the question is how easily they are visible for new users.

Thanks
Kumar.k

Jesper
03-30-2007, 09:24 AM
RigidBody,

The situation with OpenGL on Windows is like this: Once upon a time, Microsoft and SGI were working together to support OpenGL on Windows. Then some day Microsoft invented DirectX, which included Direct3D, Microsoft's proprietary API for 3D graphics. At that moment Microsoft decided that they didn't want to support OpenGL anymore.

So development of OpenGL on Windows stopped at version 1.1. The OpenGL header files are still in the current version of the Windows SDK, but they are still the version 1.1 header files and Microsoft doesn't bother to update them anymore. Fortunately the builders of graphics cards still provide support for newer OpenGL versions in their Windows device drivers, so we do have up-to-date OpenGL support on Windows. It's just a little hard to use all the newest features.

So now there are a few options if we want to use OpenGL 1.2 or newer features on Windows:

1. Download and install the SDK from nVidia, ATI or another graphics card vendor (what you're doing on Linux). The downside to this is that it makes your software dependent on that SDK from that particular vendor. If you're writing a piece of open source software, that's not nice, because anyone who wants to build your software will need to download and install the SDK from your graphics card vendor. (The ATI Radeon SDK is 400 MB!).

2. Use a library like GLEW that makes it easy to get to the OpenGL 1.2 or newer features. Ok, this will make your software dependent on GLEW, but GLEW is at least independent of any graphics card vendor, it's cross-platform and it's a lot smaller than the ATI or nVidia SDK.

RigidBody
04-02-2007, 05:15 AM
well, microsoft's attitude towards opengl is well-known :D it has been discussed in other threads.

i don't want to start a flame-war here, but if you have linux and a nvidia card you just download the driver from nvidia (less than 10 MB), which includes recent gl.h, glext.h, glx.h & glxext.h. it's pretty simple.

excuse my ignorance, but why should i download a 400MB sdk, when i just want to make some opengl apps? what is included in it?

marshats
04-15-2007, 09:51 AM
I try to keep all my openGL programs cross-platform (linux mainly but also osx, and windows). For that reason just relying on a vendors gl.h, glext.h, glx.h & glxext.h to be up to date with their latest drivers tends to be problematic. This is another reason, besides simplifying and improving the aesthetics of the C-code, that I turn to a cross platform helper like GLEW.

As for size, a quick "ls -alF" shows that GLEW is reasonably sized ( much << 400MB ) on my linux box;

96676 bytes /usr/lib64/libGLEW.a
228840 bytes /usr/lib64/libGLEW.so.1.3.4
474288 bytes /usr/include/GL/glew.h