video card upgrade and selection

Environment: Windows 7, 64 bit, Visual Studio (full version, not express), C++
I found some code for a starter program but when trying to open the window the program just dissapears. My device manager shows I have an ATI Radeon HD 4200. A web page indicates that I need ATI Radeon 9600 or better graphics card
or NVIDIA GeForce FX 5200 or better. But the video card designators don’t seem to line up nicely.

Is this a likely cause of my program not working?
Is there a forum for sticky topic that has a list of various video cards.

I don’t play many games but I need to learn OpenGL to write code at work. what are your suggestions.

Edit: when my posting window scrolls the screen jumps up and down as I type each letter. I cannot see whay I am typing. Is this a common problem?

An ATI Radeon 9600 is an OpenGL 2.1 card from around 2002.
Your ATI Radeon HD 4200 is an OpenGL 3.3 card from 2009, so it easily meets your requirements.
Check the OpenGL version returned by glGetString( GL_VERSION ), if its not at least 2.1 then you have either not setup your pixelformat correctly or the graphics driver has not been properly installed.

when my posting window scrolls the screen jumps up and down as I type each letter. I cannot see whay I am typing. Is this a common problem?

In the top right corner of the posting window you will find two black triangles, click the downward pointing triangle several times until the window is big enough to fit all of your text without jumping.

Hello Simon,
I added a few lines to my code to produce:


int _tmain(int argc, _TCHAR* argv[])
{
  GLubyte gl_version[ 30 ];
  const GLubyte *p_gl_version = gl_version;
  p_gl_version = glGetString( GL_VERSION );
  Initialize( argc, NULL );  
  glutMainLoop(); 
  return 0;
}

In this location p_gl_version is NULL after the call. It cannot be moved velow the Initialize() because the program crashes somewhere in there. When it crashes, it very briefly shows the DOS window with some text. The display is removed before I can read the text.

You cant call any OpenGL functions until after you have set the pixel format for the window and created the context.

If your program crashes in Initialize then thats what you need to fix.
I assume you initialize glut for your main window and it sets the pixelformat and creates the context, but i have never used glut so you will have to check what you are doing against whatever book or tutorial you are learning from.

Why is there a DOS window at all? A GUI application should not have one normally, are you sure you dont have your compiler set to create a console application instead of a normal windows application?

Hello Simon,
I copied the code from here: Chapter 1
The Openglbook web page.
I created the simplest project I could which is a console application.
How should I inserte this code into some project in Visual Studio 2008 C++ setup?
PS: it does not crash directly in my code. I can use the debugger and step all the way into freeglut_window.c to to this call:


    window->Window.Handle = CreateWindowEx(
        exFlags,
        _T("FREEGLUT"),
        title,
        flags,
        x, y, w, h,
        (HWND) window->Parent == NULL ? NULL : window->Parent->Window.Handle,
        (HMENU) NULL,
        fgDisplay.Instance,
        (LPVOID) window
    );

This call never returns. The values look good from what I can tell.

From OpenGL Extension Viewer Download Page you can download and install a program that will check your graphics driver is installed and working properly.

If you are having problems using FreeGLUT then post specific questions in the OpenGL Toolkits Forum

I was unable to get a result from glGetString() so could not verify if my card was sufficiently advanced. On another forum I was told it could not support OpenGL.

Today I received and installed an ATI Radeon HD5670. The same program now runs. So the ATI HD4200 is not sufficient. Now I can continue on with the OpenGL book web site and see where I get.

Question: Where would you send a suggestion to the OpenGL group for glGetString()? Seems to me there should be something that can be called very early in the process to determine if the video card is up to snuff.

Thanks for taking the time to respond.

I was unable to get a result from glGetString() so could not verify if my card was sufficiently advanced. On another forum I was told it could not support OpenGL.

If you were unable to get a result from glGetString(), you had much bigger problems than your GPU of choice. More than likely, you weren’t able to create an OpenGL context at all, which would imply other issues.

Where would you send a suggestion to the OpenGL group for glGetString()? Seems to me there should be something that can be called very early in the process to determine if the video card is up to snuff.

There’d be no point, since they can’t do that.

“up to snuff” is an entirely subjective measurement. Your HD 4200 (when properly installed) would work fine as an OpenGL 3.3 card. I code, in part, on an HD 3300, which has no problems with GL 3.3 (outside of actual driver bugs).

Furthermore, until an OpenGL context is created, OpenGL functions don’t do anything. And once it’s created, there’s nothing much you can do anymore; the context was made.

You already have the ability through wglCreateContextAttribARB to ask for specific versions. And most platform-independent layers (FreeGLUT, GLFW, etc) will allow you to specify what version you want. But those are not technically part of OpenGL. There isn’t anything more the ARB can do in this regard.

glGetString cant be called until you have an OpenGL context because a windows computer can have multiple video cards and multiple screens plugged into it, and each one may need to return different strings to glGetString.
The HDC used to create the context tells windows which screen the window is on and hence which display driver that OpenGL32.DLL should send the glGetString command to.
It is also possible to choose software rendering with the SetPixelFormat command and not use the graphics driver at all.
In this case glGetString will return completely different results to what your graphics card driver would return.

Well!, …, I did not realize that. I did not have the knowledge then to change to GL 3.3 and installed an ADI Radeon HD 5670, which obviously did the trick.

Now that I have it, might as well stick with it.
Thanks for the reply.