Win7pro 64Bit openGL?

Hi im new here and intrested in learning C++ openGL. Ive got books On C++ but not OpenGL. Ive been looking at openGL for ages but dont no what to install. Ive been looking and no that you need GULT etc but not sure which version to use. Im using.

Win7 pro 64Bit
Microsoft C++ Express edition 2008

Any info would be greatfull Thanks alot.

Creating 64bit applications that use OpenGL is not a problem at all. All needed header and library files come with Visual Studio (i.e. Visual C++). Additionally (for extensions), you need to download extra header files here:
http://www.opengl.org/registry/

I also recommend using GLEW ( http://glew.sourceforge.net/ ) for quickly getting extensions to work.

You probably need to use a ‘standard’ or ‘professional’ version of Visual Studio, because AFAIK Visual Studio Express 2008 does not support 64bit compilation.

…although 32-bit OpenGL apps will run just fine on Windows 7 64-bit as well, and are perfectly suitable for learning with. (Being on a 64-bit OS doesn’t mean that one has to create 64-bit apps… :slight_smile: )

I recommend using one of the extension and window manager wrappers too, although you can also get good mileage from dear old SDL. I’d also recommend - at some point in the future - learning how to set up OpenGL properly under Windows, using the raw API calls. Don’t do it now as you don’t want to be distracted by stuff like CS_OWNDC and SetPixelFormat, you just want to start putting triangles on-screen.

The big decision now is whether to go for “classic” OpenGL (i.e. 2.1 or earlier, with or without shaders) or “new” OpenGL (later versions). I personally would still recommend “classic” OpenGL (without shaders) as being the single best entry-level with the easiest learning curve. It’s great for answering questions like “what is a matrix and how does it affect what I draw” without smothering you under the accumulated baggage of all the supporting infrastructure you need to set up for the newer stuff.

The quintessential OpenGL “hello world” application is typically a single triangle on-screen, with you can then colour in and make spin, and maybe put a texture on. This gives a great foundation of knowledge for moving forward from, and you’ll learn a LOT of basic concepts from it that will be essential to know moving forward. So I’d say not to worry about extensions either for now, just draw that triangle and get comfortable with the most basic OpenGL 1.1 code before moving forward.

If you can find an older copy of the OpenGL Red Book or the Superbible either on-line or in a used bookstore it’ll be really good for easing you in. Look for something that supports roundabout OpenGL 1.3 to 1.4 level, although don’t be put off if there is an appendix on shaders. There are also several good tutorials on-line, although I personally find that some of them confuse matters a little by focussing too much on the C++ class structure at the expense of the basic OpenGL code you need to know.

There’s a tutorial index also available here: http://www.opengl.org/code/.

Best of luck! :slight_smile:

OpenGL properly under Windows

What does that mean? I have found openGL to be a great cross platform API. Nothing more frustrating than seeing extraneous os-specific code when there are perfectly good libraries to help simplify openGL coding. It is definitely worth learning the “proper” windows way just to see how much easier it can be to use SDL, GLUT, GLFW, and the like cross-platform helper libraries.

It just means using the native Windows API, which has the advantage that the end-user doesn’t have to install any additional libraries on their machine to get the app working. This of course only applies if you’re distributing the app, and it’s a balancing act between making things easier for the developer vs making things easier for the user.

Take the example of SDL. The end user needs the SDL DLLs, yes? But in Visual Studio 2008 you need to configure your app to use the DLL versions of the C/C++ runtime, meaning that the end user also needs to install the C/C++ runtime. These are all usability barriers and can make the difference between the user thinking “this app’s cool” or thinking “this app sucks, it’s stupid, I get weird error messages”.

Ultimately the OS-specific portion, involving getting a Window up and enabled for OpenGL and loading any extensions needed, will be a very very small part of the application code so I don’t see it as being that big a deal.

But all of this is a LONG way from where the OP is at, and should probably be in a separate thread.

But in Visual Studio 2008 you need to configure your app to use the DLL versions of the C/C++ runtime, meaning that the end user also needs to install the C/C++ runtime. These are all usability barriers and can make the difference between the user thinking “this app’s cool” or thinking “this app sucks, it’s stupid, I get weird error messages”.

Just about every application that gets delivered on Windows uses Visual Studio, and just about every one uses the C++ DLL runtimes from VS. They don’t have a problem with delivering the runtimes in their installer.

It is not the end-user’s job to deliver any DLLs necessary for your application to run. It is the application developer’s job. And this isn’t exactly some mysterious arcane bit of programmer lore; everyone does this. It’s a solved problem.

Hi Thanks for replies.

Ive downloaded GLUT and it works the only thing is that the glut32 DLL file instead of putting it in system32 i had to put it in SysWOW64 as when i did put it in system32 there where no such file.

OpenGL looks easyier then direcx, well i say easyier but that dont mean it be a breeze to do hehe.

I downloaded a sample programe and at the top of the script its got.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <GL/glut.h>

but when i pressed F5 to run it, it said that there where no such file as <GL/glut.h>. I then changed <GL/glut.h> to.
< glut.h > then it worked.

Why didnt the programe work with <GL/glut.h>. ?.

Why didnt the programe work with <GL/glut.h>. ?.

Because <GL/glut.h> is not a magic word that means “make GLUT work.”

The angle bracket notation around a #include has a meaning. Specifically, it means that it will look for the header file using the library path specified in your build options. The “GL” part is a directory name.

Specifying <GL/glut.h> means that one of the directories in your library path will have a directory named “GL” in it, and in that directory will be a file called “glut.h”. If this is not the case, then the compiler will not be able to find the file.

Which means if you point your library paths at the directory that has “glut.h” in it, then it will not be in the directory “GL” beneath that path. The compiler will not find the file, and it will complain about it.

Hi thanks. Ive managed to set everything up in C++ 2008 express edition and using a new project under win32 aplication under windows 64bit.

Carnt wait to get learning properly :smiley:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.