You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.5 KiB

@require(passthru, functions, enums, options, version, extensions)
#include "flextGLWindowsDesktop.h"
#include <cstdio>
#include <cstdlib>
#include "Magnum/Platform/Implementation/OpenGLFunctionLoader.h"
void flextGLInit() {
Magnum::Platform::Implementation::OpenGLFunctionLoader loader;
@for category,funcs in functions:
@if funcs:
/* GL_@category */
@for f in funcs:
@if f.name not in ['BlendFunc', 'Clear', 'ClearColor', 'ClearDepth', 'ClearStencil', 'ColorMask', 'CullFace', 'DepthFunc', 'DepthMask', 'DepthRange', 'Disable', 'DrawBuffer', 'Enable', 'Finish', 'Flush', 'FrontFace', 'GetBooleanv', 'GetDoublev', 'GetError', 'GetFloatv', 'GetIntegerv', 'GetString', 'GetTexImage', 'GetTexLevelParameterfv', 'GetTexLevelParameteriv', 'GetTexParameterfv', 'GetTexParameteriv', 'Hint', 'IsEnabled', 'LineWidth', 'LogicOp', 'PixelStoref', 'PixelStorei', 'PointSize', 'PolygonMode', 'ReadBuffer', 'ReadPixels', 'Scissor', 'StencilFunc', 'StencilMask', 'StencilOp', 'TexImage1D', 'TexImage2D', 'TexParameterf', 'TexParameterfv', 'TexParameteri', 'TexParameteriv', 'Viewport', 'BindTexture', 'CopyTexImage1D', 'CopyTexImage2D', 'CopyTexSubImage1D', 'CopyTexSubImage2D', 'DeleteTextures', 'DrawArrays', 'DrawElements', 'GenTextures', 'IsTexture', 'PolygonOffset', 'TexSubImage1D', 'TexSubImage2D']:
flextgl@f.name = reinterpret_cast<@f.returntype\
(APIENTRY*)(@f.param_type_list_string())>(loader.load("gl@f.name"));
@end
@end
@end
@end
}