sys/windows: wgl style fix

This commit is contained in:
hikari
2022-12-06 02:01:35 +02:00
parent abaacfe78d
commit 89eb351d2b
+2 -1
View File
@@ -90,7 +90,8 @@ foreign Opengl32 {
// https://www.khronos.org/opengl/wiki/Load_OpenGL_Functions#Windows
gl_set_proc_address :: proc(p: rawptr, name: cstring) {
func := wglGetProcAddress(name)
if uintptr(func) == 0 || uintptr(func) == 1 || uintptr(func) == 2 || uintptr(func) == 3 || uintptr(func) == ~uintptr(0) {
switch uintptr(func) {
case 0, 1, 2, 3, ~uintptr(0):
module := LoadLibraryW(L("opengl32.dll"))
func = GetProcAddress(module, name)
}