3
These stubs can be used to run OpenGL applications headlessly, ie without
4
needing X or a graphics card.
9
To use them, instead of linking with `libGL`, `libGLU` and so on,
10
build the stubs into one or more libraries (eg `glstub.c` -> `libGLstub.a`).
11
Then link with that/those libraries, and additionally continue linking
12
with GLEW, but make sure to link __after__ linking with the `glewstub.c` object.
14
Then, any calls to `gl*` and so on will simply do nothing.
16
Note that the API is NOT complete, just sufficieint for Spring,
17
so if you use it with other applications, you may need to stub out
23
Ok, so let us say you link these with your application but it complains that
24
there is a missing symbol, like `SDL_SomeSymbol`.
27
* open the corresponding include, for example if it is SDL,
28
it might be `/usr/include/SDL/SDL.h`
29
* search for the appropriate missing function
30
* copy and paste the function declarataion into the appropriate stub file,
31
eg if it is an SDL function, paste it into `sdlstub.c`
32
* add an empty body for it.
34
So you will end up with something like:
36
int SDL_SomeSymbol(int some param ){
40
* Rebuild your application and hopefully it will work now.