unable to get gl context

I need some help with these two related problems:
Computer: Sony Vaio PCG-GRT170 Pentium®4 - 2.8GHz, Windows XP Home v2002 service pack 1, GeForce FX5600 graphics card

1- Simple Opengl application under Visual C++ 6.0 Pro:
Compiling: ok
Linking: warning message "LNK 4098: defaultlib “MSVCRT” conflits with use of other libs; use /NODEFAULTLIB: library.
I fixed that but it does not change so much.
Executing: The program opens the window, the commands seem to be working, but it does not render anything.
Debugging: I notice that the function wglCreateContext (…) returns NULL pointer, and the code error is 1114.

2- Paradigm/Vega Marine application under Visual C++ 6.0 Pro:
Compiling and linking: ok
Execution: Vega return the following warnings and errors:
=> warn : Unable to get gl context for root window!
=> warn : OpenGL VENDOR: (null)
=> warn : OpenGL RENDERER: (null)
=> warn : OpenGL VERSION: (null)
=> fatal: jsWindow: Unable to get gl context!

These two applications run perfectly in my desktop computer under Windows 2k, GeForce 4 and the same Visual C++ Pro.

Does anybody have any idea what’s going on??

Thanks, David Sicuro

Can you run other opengl applications? Can you get any NeHe examples to compile and work?

  • elias

Maybe your OpenGL driver is damaged. Try updating the driver.

Jan.

Originally posted by elias:
[b]Can you run other opengl applications? Can you get any NeHe examples to compile and work?

  • elias[/b]

I downloaded the NeHe opengl lesson 5. The run time error is: “Can’t Create A GL Rendering Context”

-david

Originally posted by Jan2000:
[b]Maybe your OpenGL driver is damaged. Try updating the driver.

Jan.[/b]

Ok! It worked! But I would like to understand one thing. In my computer I had newer versions of opengl. When I downloaded from Opengl.org I got files dated from 1996!
These files made my programs work! Maybe I need a more recent version for another application. How does it work?

Thanks about the support.
david

[QUOTE]Originally posted by dlsicuro:
[b] Sorry but I talk it too soon. The simple opengl applications are running well now, but the Paradigm Vega application don’t. Now the initial warning messages are:
=> warn: OpenGL Vendor: Microsoft Corporation
=> warn: OpenGl Renderer: GDI Generic
=> warn: OpenGl Version: 1.1.0

It can detect the correct graphics card. In my desktop, the opengl version is 1.3.1.
Where can I get the version I need?

david

Here .

Originally posted by zeckensack:
Here .

I installed the Nvidia drivers. The Vega problem persists. I can not see any diference in the date of opengl files in VC98\include\gl, VC98\lib and Windows\System32.
What am I missing?

Well, the only thing I can think of right now (no GL programs work, right?) is that you’re running your desktop in 256 color mode. This disables hardware acceleration for windowed rendering. If that’s the case, switch to 16bpp or 32bpp.

Otherwise, I’m completely stumped. Might be a case for the user help forum .

Originally posted by dlsicuro:
I installed the Nvidia drivers. The Vega problem persists. I can not see any diference in the date of opengl files in VC98\include\gl, VC98\lib and Windows\System32.

AFAIK, nvidia drivers doesn’t replace headers/libs in VC++. The opengl32.dll(opengl95.exe) that are linked on opengl.org are for old win95 machines that came with opengl 1.0. All later MS OSs already have these files so you should not replace them.

The headers/libs shipping with VC++ should work for you. Make sure original files are in place(reinstall VC if you have too).
The opengl32.dll and glu32.dll shipping with XP should work for you. Replace them from the XP cd. NVIDIA/ATI drivers does not replace these files, they add their own.

Originally posted by roffe:
[b] AFAIK, nvidia drivers doesn’t replace headers/libs in VC++. The opengl32.dll(opengl95.exe) that are linked on opengl.org are for old win95 machines that came with opengl 1.0. All later MS OSs already have these files so you should not replace them.

The headers/libs shipping with VC++ should work for you. Make sure original files are in place(reinstall VC if you have too).
The opengl32.dll and glu32.dll shipping with XP should work for you. Replace them from the XP cd. NVIDIA/ATI drivers does not replace these files, they add their own.[/b]

I don’t have a XP cd. It did not came with my new notebook!! What should I do?
david

Maybe these files come with sp1 for xp. Try renaming the old ones and apply service pack 1.

This is the advanced forum, why don’t you post in the…o sod it, i can’t be arsed anymore.

Originally posted by roffe:
Maybe these files come with sp1 for xp. Try renaming the old ones and apply service pack 1.

I called Sony and they suggested to reinstall everything as the computer comes from the factory. I am doing that…
Thanks anyway.
David