Loads the OpenGL library. Some of the internal gl function pointers are loaded here and the rest are loaded in `OglSdlSurface`. TODO why?
***
-`void SetTexture (GLMipmap_t *TexInfo)`
`TexInfo` becomes the current texture, used in future draw calls. If NULL, then a white texture is used. The texture will be uploaded to the GPU if it has not been yet. The texture will be converted to a format usable by the GPU if required.
...
...
@@ -56,7 +60,7 @@ Clears the color buffer with `ClearColor` if `ColorMask` is set. Clears the dept
@@ -113,17 +117,43 @@ Renders the "final" screen texture on the screen, stretched into dimensions defi
***
-`boolean CompileShaders (void)`
Compiles the shaders so they can be used in rendering. Needs to be called before using shaders for the first time. Any custom shaders set with `LoadCustomShader` will be compiled too. The function can be called again to remove old compiled shaders and re-compile them.
If the function returns false, it means that the hardware does not support shaders or that the code has been compiled without shader support. In either case, the user of the backend needs to take the lack of shader capability into account. This is currently the method that will reveal if shaders can be used or not for the user of the backend.
-`void CleanShaders (void)`
Removes custom shader source code from memory. Next call to `CompileShaders` will not have them. Call `CompileShaders` for the changes to come into effect.
Puts a custom shader into slot `number`. (See SHADER_* in hw_defs.h for slots.) The source code is in `code` and the length of the source code string is defined in `size`. `isfragment` is true for fragment shaders and false for vertex shaders. Call `CompileShaders` for the changes to come into effect.
-`void SetShader (int type)`
If shaders are enabled, the currently used shader is set to `type`.
-`void UnSetShader (void)`
The fixed function pipeline is used for draw calls instead of shaders. (used for most/all non-3d stuff?)