OpenGL Lighting and C++ Builder

Started by
1 comment, last by atcdevil 22 years, 7 months ago
I wrote a minimal Windows program in C++ Builder, no VCL or any of that. I set up OpenGL and then I tried to enable lighting. The line glEnable(GL_LIGHTING); will cause me to receive a run-time error, that says floating point division by zero error. The program will then freeze and shut down or whatever. I sent the exact code that gave me this error to my friend. He compiled it in Microsoft Visual C++. It ran perfectly fine. Now eventually I''m going to want to use lighting in my programs. Anyone know what I can do to fix this?
Advertisement
hi there,

when using opengl with borland compilers you need to
disable floating point exceptions.

in delphi you use ''Set8087CW($133F);'' in c++builder its
something simular but io cannot remember what. I think
it may be on the opengl web site under FAQ''s.

I have the code at hame and will post it here tonight.

Cheers

Mark
its the same !!!

This topic is closed to new replies.

Advertisement