Adding GLextentions to the Torque, questions with winGL.cc
by Joshua "The Power Nap" Taylor · in Torque Game Engine · 08/10/2003 (3:22 pm) · 6 replies
I've been adding Cg to the Torque over the weekend, and I noticed that in the glh_genext.h header that comes with the NVidia developer kit assigns values to the same function pointers that winGL.cc does.
I know this is partially because of the transparent layer that the Torque has between DirectX and OpenGL.
If anyone could give me some input on how to adress this issue, I'd be greatfull. Even if it means that I have to go fully OpenGL with the Torque.
I know this is partially because of the transparent layer that the Torque has between DirectX and OpenGL.
If anyone could give me some input on how to adress this issue, I'd be greatfull. Even if it means that I have to go fully OpenGL with the Torque.
#2
It is in that function that the function pointers are reassigned.
08/10/2003 (5:37 pm)
So if I call glh_init_extension from the glh_genext.h function, all should be well?It is in that function that the function pointers are reassigned.
#3
well I would prolly just write the code into winGL.cc
to initialize the "new" pointers that arent currently supported.
and forget about calling glh_init_extension(s) completely.
Im not overly familiar with the Cg api but... you shouldnt have any trouble from this would ya?
doing it this way is more control centric IMHO.
08/10/2003 (6:50 pm)
..well I would prolly just write the code into winGL.cc
to initialize the "new" pointers that arent currently supported.
and forget about calling glh_init_extension(s) completely.
Im not overly familiar with the Cg api but... you shouldnt have any trouble from this would ya?
doing it this way is more control centric IMHO.
#4
That was the solution I was looking for. Oh, and it's not the Cg API that requires this, it's the NVidia exentions. The Cg API is quite transparent to all that.
08/10/2003 (7:01 pm)
Honestly,That was the solution I was looking for. Oh, and it's not the Cg API that requires this, it's the NVidia exentions. The Cg API is quite transparent to all that.
#5
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=4519
you should post it as a resource :)
08/10/2003 (7:03 pm)
Here is a thread that will surely help:www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=4519
you should post it as a resource :)
#6
Hope that was the problem you were asking about...
Good luck.
08/11/2003 (9:20 am)
I used CG some time ago... a long time ago actually.. so I might be wrong, but the Cg header includes or defines the standard OpenGL functions. Torque does the same. This means that if you include the Cg header file you'll be duplicating the declarations of these functions. Best way to solve this would be to make your own Cg header file in platform/ code just as Torque does it for GL or GLU. That way you would only add the Cg functions declarations and not the already declared OpenGL ones... Hope that was the problem you were asking about...
Good luck.
Torque Owner Harold "LabRat" Brown