OpenGL: Difference between revisions

6 bytes removed ,  4 months ago
m
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 2,826:
 
Notice that we can't pass Wren methods directly to the glutDisplayFunc and glutReshapeFunc functions for callback registration purposes because of re-entrancy problems so, instead, we pass sufficient information from Wren to enable the callbacks to be constructed from the C side.
<syntaxhighlight lang="ecmascriptwren">/* openglOpenGL.wren */
 
var GL_COLOR_BUFFER_BIT = 0x4000
Line 3,123:
vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "openglOpenGL.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,476

edits