Author Topic: OTS compile  (Read 4648 times)

freezway

  • Posts: 196
  • Turrets: +10/-12
OTS compile
« on: December 25, 2010, 06:35:43 am »
So I have the source to the OTS project but I cant find a way to test it, if I compile (via make) then the mod is not inherit while running /devmap mode and loading the mod doesn't allow me to test it either. I'm new to modding, so baby steps please.

EDIT: And why does quake decide to rename all opengl funcs with a q infront of them? Theres a whole header full of #define qfunc_name func_name
« Last Edit: December 25, 2010, 06:44:34 am by freezway »

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: OTS compile
« Reply #1 on: December 25, 2010, 11:08:49 am »
EDIT: And why does quake decide to rename all opengl funcs with a q infront of them? Theres a whole header full of #define qfunc_name func_name

MicroSoft thought that just linking to libopengl would be too easy for real programmers, so all post-OpenGL 1.1 functions are only available by getting their function pointer through wglGetProcAddress.

The engine obtains all function pointers in the InitOpenGL function and stores them in variables named like the corresponding function.

But if the function pointers were named just gl*, then of course there would be duplicate symbols for those OSes which export all GL functions, so they decided to use the qgl prefix for all OpenGL functions.

The gl functions which could be used directly are #defined with qgl prefix so that the programmers don't have to mess with different prefixes for direct and indirect GL functions.