Game Development Community

UNIX X86 platform defined for windows platform

by Brett Fattori · in Torque Game Engine · 01/11/2004 (10:30 am) · 6 replies

Was doing some work and pulling hairs out until I realized that in platformGL.h there is this at the top:

#include "platformWin32/gl_types.h"
#define GL_FUNCTION(fn_return,fn_name,fn_args,fn_value) extern fn_return (__stdcall *fn_name)fn_args; 
#include "platformX86UNIX/gl_func.h"
#include "platformX86UNIX/glu_func.h"
#undef GL_FUNCTION

As you can see, it's using the Win32 gl_types.h, but it's using the X86 Unix gl_func.h and glu_func.h.

- Brett

#1
01/11/2004 (11:35 am)
Er... I guess I'm not seeing what your point is?

Perhaps those files ought to be moved to the main platform directory?
#2
01/11/2004 (6:55 pm)
I've seen this before, and I think I changed it, but I also think I got an answer as it was that way.

@Ben: what he means is that Unix's platformGL.h includes the "Windows" gl_types.h, when it should include the unix one.
#3
01/11/2004 (7:59 pm)
That's kind of funny since it compiles perfectly fine on Linux.
Actually the reason being it's using Win32's gl_types is simply because they're exactly the same on UNIX OSs, makes sense doesn't it since OpenGL is cross platform so the types definations shouldn't be different at all what so ever.
#4
01/12/2004 (5:17 am)
Yes, the types are the same, that's why it works. This way you only update one header if you change anything... though it's not the point.
#5
01/12/2004 (7:24 am)
My point was that as I added stuff to gl_func.h and gl_types.h in the platformWin32 directory, but when I compiled it couldn't find the definitions. That was my point, whether I should actually be modifying the one in the UNIX86 dirs, or the Win32 dirs??

- Brett
#6
01/15/2004 (9:05 pm)
The gl_ file situation is a bit messy. I originally made them for the unix platform, later someone copied them over to windows so that they could be used there. Ben is right, now that multiple platforms are using them, there should be only one copy of those files in the "platform" directory.