GL ES 3.2 static: restore ability to load extension procs, and load them.
This commit is contained in:
parent
f898f0b7d8
commit
1e36ce6791
2 changed files with 1185 additions and 946 deletions
src/platform
File diff suppressed because it is too large
Load diff
|
@ -219,6 +219,9 @@ proc make_window*(width, height: int32, title: string): Window =
|
|||
proc set_vsync*(window: Window, vsync: bool) =
|
||||
discard
|
||||
|
||||
type ProcAddress* = proc() {.cdecl.}
|
||||
proc eglGetProcAddress*(procName: cstring): ProcAddress {.importc, discardable.}
|
||||
|
||||
var max_messages = 0
|
||||
|
||||
proc init_graphics*(engine: MyouEngine, width, height: int32, title: string,
|
||||
|
@ -257,7 +260,7 @@ proc init_graphics*(engine: MyouEngine, width, height: int32, title: string,
|
|||
window.glfmSetSurfaceCreatedFunc proc(window: Window, w,h: cint) {.cdecl.} =
|
||||
# force resize
|
||||
window.screen = window.screen
|
||||
if not gladLoadGLES2(nil):
|
||||
if not gladLoadGLES2(eglGetProcAddress):
|
||||
echo "Could not initialize OpenGL"
|
||||
quit -1
|
||||
window.screen.engine.renderer.initialize()
|
||||
|
|
Loading…
Reference in a new issue