]> gitweb.factorcode.org Git - factor.git/commitdiff
eliminate windows.opengl32 dependency from opengl.gl.windows so we can use opengl...
authorJoe Groff <arcata@gmail.com>
Fri, 1 May 2009 01:38:18 +0000 (20:38 -0500)
committerJoe Groff <arcata@gmail.com>
Fri, 1 May 2009 01:38:18 +0000 (20:38 -0500)
basis/opengl/gl/windows/windows.factor
basis/windows/opengl32/opengl32.factor

index 8f48f60d3c0904c5874fbc64275e9d3494c00585..c8a179edf520a65ac7a95750ba200e384c9eae22 100644 (file)
@@ -1,6 +1,11 @@
-USING: kernel windows.opengl32 ;
+USING: alien.syntax kernel windows.types ;
 IN: opengl.gl.windows
 
+LIBRARY: gl
+
+FUNCTION: HGLRC wglGetCurrentContext ( ) ;
+FUNCTION: void* wglGetProcAddress ( char* name ) ;
+
 : gl-function-context ( -- context ) wglGetCurrentContext ; inline
 : gl-function-address ( name -- address ) wglGetProcAddress ; inline
 : gl-function-calling-convention ( -- str ) "stdcall" ; inline
index d0b396eba22e64581130cfc50338dbd32efbc8e3..f63a4a956a72a3f15fcfd8147f6fd38ddbbc63a9 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.syntax parser namespaces kernel
-math math.bitwise windows.types windows.types init assocs
-sequences libc ;
+math math.bitwise windows.types init assocs
+sequences libc opengl.gl ;
 IN: windows.opengl32
 
 ! PIXELFORMATDESCRIPTOR flags
@@ -100,5 +100,6 @@ LIBRARY: gl
 FUNCTION: HGLRC wglCreateContext ( HDC hDC ) ;
 FUNCTION: BOOL wglDeleteContext ( HGLRC hRC ) ;
 FUNCTION: BOOL wglMakeCurrent ( HDC hDC, HGLRC hglrc ) ;
+
 FUNCTION: HGLRC wglGetCurrentContext ( ) ;
 FUNCTION: void* wglGetProcAddress ( char* name ) ;