OpenGL with Visual C++ 6 OR .NET

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Hey, I have to do my next project for my Data Structures class using Visual C++ w/ OpenGL (yay convex hull!) and I would rather work on it from home than walk 20 mins to the CS lab where they have the correct version of VC++ 6 installed to go do it.

However, when I execute the sample code provided to us which I know works because he compiled it in class, I get the error upon execution :

GLUT: Fatal error in <unnamed>: failed to create OpenGL rendering context.

I know this means that it can't find openGL, but I've installed everything like it said following the layout here. I have to go to class until 1 or so, but I was hoping somebody might know how to fix this.

I have DirectX 9 installed and I updated my graphics drivers in hopes openGL would be found. If one of you also knows a better forum to post this, please do so because I've googled the subject to no end and I can't find any real answers!

TIA!

-silver
 

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
need more info to help.

you tried using wgl rather than glut? (assuming windows)
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Thanks for the responses so far guys!



Ok, I tried setting it up in .NET and it seems I get the same error as in VC++ 6.

GLUT: Fatal Error in test.exe: failed to create OpenGL rendering context.Press any key to continue

This looks like openGL isn't installed AT ALL on my system. I have no idea what's causing it to do this. Maybe DirectX 9 made it go crazy? The only other thing I can think of is that maybe openGL is in use or something? I'm running on an nforce2 motherboard so possibly that's it?

[edit] Not sure I made this clear, but everything compiles ok, just won't run [/edit]

-silver

 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Ok, I just downloaded the openGL tester that's commonly used for folding@home. It gives the same error! That means that openGL doesn't work with my card from the newest nvidia dets. I guess I'll have to open my case up and try to find my individual mfgr. and d/l their drivers and pray that it works, unless somebody has a better solution.

It's a g4mx IIRC.

-silver
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Ok, I found out what my card was and went to download it's drivers. Unfortunately, it just linked me to nvidia's 45.xx dets. OpenGL still not working :( If anybody has ever seen this before, please let me know if you have a fix.

-silver
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Originally posted by: Cat
http://developer.nvidia.com/object/nvpixelformat.html

Install and run, please. You're not running in 256-color mode, are you?

You should be able to AT LEAST get generic acceleration via Microsoft's implementation. Does opengl32.dll exist in your %windows%/system32/ directory?

Sorry I didn't respond sooner, I've been doing the back-end coding for the project.

Nope, no 256 colors here. opengl32.dll existed in my system directory and I also copied it over to system32 in hopes it would fix it. Ran and installed, crash upon load. Maybe it's a bug?

Epox 8RDA+, Win XP SP1, det 50.x and 45.x

-silver
 

Cat

Golden Member
Oct 10, 1999
1,059
0
0
Try disabling video hardware acceleration via the control panel. See what happens then. Also run dxdiag.exe.
 

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
Originally posted by: Cat
Try disabling video hardware acceleration via the control panel. See what happens then. Also run dxdiag.exe.

He's trying to get OpenGL to work, not DirectX.
 

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
Originally posted by: Cat
Try disabling video hardware acceleration via the control panel. See what happens then. Also run dxdiag.exe.

YAY! That worked! Thank you sooooo much!

I can do my project now :)

-silver
 

Cat

Golden Member
Oct 10, 1999
1,059
0
0
Congrats! Try raising the slider on the video acceleration one notch at a time until the application fails. Also try changing your AGP bus speed, disabling fast writes, increasing AGP voltage (if possible on your motherboard.) Sounds like your motherboard or video card has problem.s

KraziKid: dxdiag crashing would indicate it's a hardware problem, and not some strange OpenGL-only software problem. Please stick to your areas of expertise, whatever they may be. :)