PDA

View Full Version : unable to get gl context



dlsicuro
08-01-2003, 12:54 PM
I need some help with these two related problems:
Computer: Sony Vaio PCG-GRT170 Pentium(R)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

elias
08-02-2003, 01:56 AM
Can you run other opengl applications? Can you get any NeHe examples to compile and work?

- elias

Jan
08-02-2003, 02:43 AM
Maybe your OpenGL driver is damaged. Try updating the driver.

Jan.

dlsicuro
08-02-2003, 06:20 AM
Originally posted by elias:
Can you run other opengl applications? Can you get any NeHe examples to compile and work?

- elias

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

-david

dlsicuro
08-02-2003, 07:19 AM
Originally posted by Jan2000:
Maybe your OpenGL driver is damaged. Try updating the driver.

Jan.

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

dlsicuro
08-02-2003, 07:31 AM
[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

zeckensack
08-02-2003, 08:05 AM
Here (http://www.nvidia.com/object/winxp-2k_44.03.html) .

dlsicuro
08-02-2003, 08:42 AM
Originally posted by zeckensack:
Here (http://www.nvidia.com/object/winxp-2k_44.03.html) .

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?

zeckensack
08-02-2003, 10:23 AM
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 (http://www.opengl.org/discussion_boards/cgi_directory/forumdisplay.cgi?action=topics&forum=User+Hardware,+Software,+|AMP|+Gaming+Help&number=1&DaysPrune=20&LastLogin=) .

roffe
08-02-2003, 11:07 AM
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.

dlsicuro
08-02-2003, 12:08 PM
Originally posted by roffe:
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.

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

roffe
08-02-2003, 12:45 PM
Maybe these files come with sp1 for xp. Try renaming the old ones and apply service pack 1.

knackered
08-02-2003, 01:54 PM
This is the advanced forum, why don't you post in the......o sod it, i can't be arsed anymore.

dlsicuro
08-02-2003, 03:00 PM
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