diff options
author | Sven Gothel <[email protected]> | 2012-01-09 03:51:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-01-09 03:51:35 +0100 |
commit | c49d29784986b1945343b9a90b5e0c9f3d95d937 (patch) | |
tree | 96f7b12b4e230555b199235a7981ff82e3203f37 /make | |
parent | 9e61d4529143ff3f6de15ce55f8e8747f67a86c9 (diff) |
Dispatch the '5' GDI/WGL functions and allow using their 'wgl' variants. GDI is the default.
The following 5 GDI functions have their 'wgl' counterparts
which 'shall' being used in case the OpenGL DLL is being loaded dynamically.
(So reads the documentation & FAQ).
This seems to be required only in case the std. opengl32.dll is not being used.
This use case is called GDI/ICD.
If using a non std. OpenGL DLL, is called MCD.
We dynamically load the OpenGL DLL and fetch the address pointer.
Since we generally use the std. opengl32.dll, our use of the GDI callbacks
seems to be legal. However, to test using the 'wgl' method WGLUtil is introduced.
You can test using the 'wgl' variants
by defining the property: 'jogl.windows.useWGLVersionOf5WGLGDIFuncSet'.
In case you have troubles, ie crashes within pixelformat setup etc,
it might be interesting if this may impact your behavior.
- ChoosePixelFormat(long, PIXELFORMATDESCRIPTOR)
- DescribePixelFormat(long, int, int, PIXELFORMATDESCRIPTOR)
- GetPixelFormat(long)
- SetPixelFormat(long, int, PIXELFORMATDESCRIPTOR)
- SwapBuffers(long)
Diffstat (limited to 'make')
-rw-r--r-- | make/build-jogl.xml | 9 | ||||
-rw-r--r-- | make/build-nativewindow.xml | 19 | ||||
-rw-r--r-- | make/config/jogl/wgl-win32.cfg | 5 | ||||
-rwxr-xr-x | make/scripts/java-win64-dbg.bat | 7 | ||||
-rw-r--r-- | make/stub_includes/win32/windows.h | 10 | ||||
-rw-r--r-- | make/stub_includes/win32/wingdi.h | 165 | ||||
-rw-r--r-- | make/stub_includes/win32/wingdi_types.h | 166 | ||||
-rw-r--r-- | make/stub_includes/win32/winwgl.h | 11 |
8 files changed, 210 insertions, 182 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml index 511f147be..7dff177b9 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -382,12 +382,6 @@ <!--property name="java.generate.skip" value="true"/--> </target> - <target name="java.generate.cleantemp"> - <delete includeEmptyDirs="true" quiet="true"> - <fileset dir="${tempdir}/gensrc" /> - </delete> - </target> - <target name="java.generate.copy2temp"> <copy todir="${tempdir}"> <fileset dir="${build.jogl}" @@ -990,8 +984,6 @@ - will be generated. --> <target name="java.compile.firstpass" depends="java.generate,java.generate.cg"> - <antcall target="java.generate.cleantemp" inheritRefs="true" /> - <!-- Perform the first pass Java compile. --> <javac destdir="${classes}" includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java javax/media/opengl/GL4.java javax/media/opengl/GL4bc.java" @@ -1641,7 +1633,6 @@ --> <target name="clean" description="Remove all build products" depends="declare.common"> <delete includeEmptyDirs="true" quiet="true"> - <fileset dir="${tempdir}" /> <fileset dir="${build.jogl}" /> <fileset dir="${javadoc}" /> <fileset dir="${javadoc.spec}" /> diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index 7a06cef31..98cd0befc 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -222,6 +222,7 @@ <target name="java.generate.windowlib" if="windowlib.os.cfg"> <echo message="Generating Windowing Lib implementation class" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> <gluegen src="${stub.includes}/${window.os.system}/window-lib.c" outputRootDir="${build.nativewindow}" config="${windowlib.os.cfg}" @@ -240,6 +241,7 @@ - handle different drives in an effective manner. --> <echo message="Generating JAWT interface class" /> <echo message="java.home.dir=${java.home.dir}" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> <gluegen src="${jawt.platform.header}" outputRootDir="${build.nativewindow}" config="${jawt.cfg}" @@ -272,6 +274,8 @@ <!-- Use the GlueGen task to generate the Java files --> + <antcall target="java.generate.cleantemp" inheritRefs="true" /> + <echo message="Generating platform-specifics: X11" /> <antcall target="java.generate.platforms" inheritRefs="true"> <param name="window.os.system" value="x11"/> @@ -887,11 +891,26 @@ --> <target name="clean" description="Remove all build products" depends="declare.common"> <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${tempdir}" /> <fileset dir="${build.nativewindow}" /> <fileset dir="${javadoc}" /> <fileset dir="${javadoc.spec}" /> <fileset dir="${javadoc.dev}" /> </delete> + <antcall target="java.generate.cleantemp" inheritRefs="true" /> + </target> + + <target name="java.generate.cleantemp"> + <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${tempdir}/gensrc" /> + </delete> + </target> + + <target name="java.generate.copy2temp"> + <copy todir="${tempdir}"> + <fileset dir="${build.nativewindow}" + includes="gensrc/classes/**" /> + </copy> </target> <!-- ================================================================== --> diff --git a/make/config/jogl/wgl-win32.cfg b/make/config/jogl/wgl-win32.cfg index c7adffa7b..4d2fea5d0 100644 --- a/make/config/jogl/wgl-win32.cfg +++ b/make/config/jogl/wgl-win32.cfg @@ -3,6 +3,8 @@ JavaOutputDir gensrc/classes NativeOutputDir gensrc/native/jogl/Windows +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/jogamp/nativewindow/windows/GDI.java + Package jogamp.opengl.windows.wgl JavaClass WGL Style AllStatic @@ -21,6 +23,9 @@ EmitProcAddressTable true ProcAddressTableClassName WGLProcAddressTable GetProcAddressTableExpr wglProcAddressTable +Ignore PIXELFORMATDESCRIPTOR + +Import jogamp.nativewindow.windows.PIXELFORMATDESCRIPTOR Import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver CustomJavaCode WGL private static WGLProcAddressTable wglProcAddressTable = new WGLProcAddressTable(new GLProcAddressResolver()); diff --git a/make/scripts/java-win64-dbg.bat b/make/scripts/java-win64-dbg.bat index 802c011cf..5686224d5 100755 --- a/make/scripts/java-win64-dbg.bat +++ b/make/scripts/java-win64-dbg.bat @@ -20,8 +20,9 @@ REM set D_ARGS="-Djogamp.debug.JNILibLoader=true" "-Djogamp.debug.NativeLibrary= REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.Lock" "-Djogamp.debug.Lock.TraceLock"
REM set D_ARGS="-Djogl.debug=all" "-Dnativewindow.debug=all"
REM set D_ARGS="-Djogl.debug=all"
-REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceLock" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
-set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceLock"
+REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
+REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.windows.useWGLVersionOf5WGLGDIFuncSet"
+set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch"
REM set D_ARGS="-Dnewt.debug.Window"
REM set D_ARGS="-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
REM set D_ARGS="-Djogl.debug.DebugGL" "-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.GLSLCode"
@@ -33,6 +34,6 @@ REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display" "-Dnewt.debug.EDT" " REM set D_ARGS="-Dnewt.debug.Screen" "-Dnewt.debug.EDT" "-Dnativewindow.debug=all"
REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display" "-Dnewt.test.Window.reparent.incompatible=true"
-set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
+REM set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.java2d.opengl=true" "-Dsun.awt.noerasebackground=true"
%J2RE_HOME%\bin\java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %D_ARGS% %X_ARGS% %* > java-win64-dbg.log 2>&1
diff --git a/make/stub_includes/win32/windows.h b/make/stub_includes/win32/windows.h index f2f3900ba..51ebbdcce 100644 --- a/make/stub_includes/win32/windows.h +++ b/make/stub_includes/win32/windows.h @@ -47,13 +47,3 @@ typedef HANDLE HPBUFFERARB; typedef HANDLE HPBUFFEREXT; typedef HANDLE HGPUNV; -typedef struct tagRECT { - LONG left; - LONG top; - LONG right; - LONG bottom; -} RECT; - -typedef RECT* PRECT; -typedef RECT* LPRECT; - diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h index b02512cfd..2d3e33275 100644 --- a/make/stub_includes/win32/wingdi.h +++ b/make/stub_includes/win32/wingdi.h @@ -6,177 +6,24 @@ * This file has no copyright assigned and is placed in the Public Domain. * No warranty is given; refer to the file DISCLAIMER.PD within this package. * - * Editions / Removals and a split (wingdi.h -> wingdi.h + winwgl.h) were made by the JogAmp Community, 2010 + * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012 */ -#ifndef WGL_GDI_VERSION_1_X +#include "wingdi_types.h" -typedef struct tagRGBQUAD { - BYTE rgbBlue; - BYTE rgbGreen; - BYTE rgbRed; - BYTE rgbReserved; -} RGBQUAD; - -typedef RGBQUAD *LPRGBQUAD; - -typedef struct tagBITMAPINFOHEADER { - DWORD biSize; - LONG biWidth; - LONG biHeight; - WORD biPlanes; - WORD biBitCount; - DWORD biCompression; - DWORD biSizeImage; - LONG biXPelsPerMeter; - LONG biYPelsPerMeter; - DWORD biClrUsed; - DWORD biClrImportant; -} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER; - -typedef struct tagBITMAPINFO { - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[1]; -} BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO; - -/* constants for the biCompression field */ -#define BI_RGB 0 -#define BI_RLE8 1 -#define BI_RLE4 2 -#define BI_BITFIELDS 3 - -/* DIB color table identifiers */ - -#define DIB_RGB_COLORS 0 /* color table in RGBs */ -#define DIB_PAL_COLORS 1 /* color table in palette indices */ - -typedef struct tagPIXELFORMATDESCRIPTOR { - WORD nSize; - WORD nVersion; - DWORD dwFlags; - BYTE iPixelType; - BYTE cColorBits; - BYTE cRedBits; - BYTE cRedShift; - BYTE cGreenBits; - BYTE cGreenShift; - BYTE cBlueBits; - BYTE cBlueShift; - BYTE cAlphaBits; - BYTE cAlphaShift; - BYTE cAccumBits; - BYTE cAccumRedBits; - BYTE cAccumGreenBits; - BYTE cAccumBlueBits; - BYTE cAccumAlphaBits; - BYTE cDepthBits; - BYTE cStencilBits; - BYTE cAuxBuffers; - BYTE iLayerType; - BYTE bReserved; - DWORD dwLayerMask; - DWORD dwVisibleMask; - DWORD dwDamageMask; -} PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR; - -#define PFD_TYPE_RGBA 0 -#define PFD_TYPE_COLORINDEX 1 - -#define PFD_MAIN_PLANE 0 -#define PFD_OVERLAY_PLANE 1 -#define PFD_UNDERLAY_PLANE (-1) - -#define PFD_DOUBLEBUFFER 0x00000001 -#define PFD_STEREO 0x00000002 -#define PFD_DRAW_TO_WINDOW 0x00000004 -#define PFD_DRAW_TO_BITMAP 0x00000008 -#define PFD_SUPPORT_GDI 0x00000010 -#define PFD_SUPPORT_OPENGL 0x00000020 -#define PFD_GENERIC_FORMAT 0x00000040 -#define PFD_NEED_PALETTE 0x00000080 -#define PFD_NEED_SYSTEM_PALETTE 0x00000100 -#define PFD_SWAP_EXCHANGE 0x00000200 -#define PFD_SWAP_COPY 0x00000400 -#define PFD_SWAP_LAYER_BUFFERS 0x00000800 -#define PFD_GENERIC_ACCELERATED 0x00001000 -#define PFD_SUPPORT_DIRECTDRAW 0x00002000 - -#define PFD_DEPTH_DONTCARE 0x20000000 -#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000 -#define PFD_STEREO_DONTCARE 0x80000000 - -/* error codes (from winerror.h) */ -/* FIXME: these should have a trailing "L" but apparently PCPP doesn't handle that syntax */ -#define ERROR_SUCCESS 0 -#define ERROR_INVALID_PIXEL_FORMAT 2000 -#define ERROR_NO_SYSTEM_RESOURCES 1450 -#define ERROR_INVALID_DATA 13 -#define ERROR_PROC_NOT_FOUND 127 -#define ERROR_INVALID_WINDOW_HANDLE 1400 - -/* - * ShowWindow() Commands - */ -#define SW_HIDE 0 -#define SW_SHOWNORMAL 1 -#define SW_NORMAL 1 -#define SW_SHOWMINIMIZED 2 -#define SW_SHOWMAXIMIZED 3 -#define SW_MAXIMIZE 3 -#define SW_SHOWNOACTIVATE 4 -#define SW_SHOW 5 -#define SW_MINIMIZE 6 -#define SW_SHOWMINNOACTIVE 7 -#define SW_SHOWNA 8 -#define SW_RESTORE 9 -#define SW_SHOWDEFAULT 10 -#define SW_FORCEMINIMIZE 11 -#define SW_MAX 11 - -/** - * GetObjectType() Command - */ -#define OBJ_PEN 1 -#define OBJ_BRUSH 2 -#define OBJ_DC 3 -#define OBJ_METADC 4 -#define OBJ_PAL 5 -#define OBJ_FONT 6 -#define OBJ_BITMAP 7 -#define OBJ_REGION 8 -#define OBJ_METAFILE 9 -#define OBJ_MEMDC 10 -#define OBJ_EXTPEN 11 -#define OBJ_ENHMETADC 12 -#define OBJ_ENHMETAFILE 13 -#define OBJ_COLORSPACE 14 - -#endif /* WGL_GDI_VERSION_1_X */ - -#ifndef WGL_GDI_VERSION_1_X -#define WGL_GDI_VERSION_1_X +#ifndef GDI_VERSION_1_X +#define GDI_VERSION_1_X // Windows routines WINBASEAPI DWORD WINAPI GetLastError(VOID); -// OpenGL-related routines +// GDI / ICD OpenGL-related routines WINGDIAPI int WINAPI ChoosePixelFormat(HDC, CONST PIXELFORMATDESCRIPTOR *); WINGDIAPI int WINAPI DescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); WINGDIAPI int WINAPI GetPixelFormat(HDC); WINGDIAPI BOOL WINAPI SetPixelFormat(HDC, int, CONST PIXELFORMATDESCRIPTOR *); WINGDIAPI BOOL WINAPI SwapBuffers(HDC); -/* --- FIXME: need to handle these entry points! -WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int); -WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD); -WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD); -#ifdef UNICODE -#define wglUseFontBitmaps wglUseFontBitmapsW -#else -#define wglUseFontBitmaps wglUseFontBitmapsA -#endif // !UNICODE -*/ - // Routines related to bitmap creation for off-screen rendering WINGDIAPI HDC WINAPI CreateCompatibleDC(HDC); WINGDIAPI HBITMAP WINAPI CreateDIBSection(HDC, CONST BITMAPINFO *, UINT, VOID **, HANDLE, DWORD); @@ -207,5 +54,5 @@ WINUSERAPI BOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProces WINGDIAPI BOOL WINAPI GetDeviceGammaRamp(HDC,LPVOID); WINGDIAPI BOOL WINAPI SetDeviceGammaRamp(HDC,LPVOID); -#endif /* WGL_GDI_VERSION_1_X */ +#endif /* GDI_VERSION_1_X */ diff --git a/make/stub_includes/win32/wingdi_types.h b/make/stub_includes/win32/wingdi_types.h new file mode 100644 index 000000000..d23502cad --- /dev/null +++ b/make/stub_includes/win32/wingdi_types.h @@ -0,0 +1,166 @@ +/** + * + * This file is derived from w64 mingw-runtime package's mingw64/x86_64-w64-mingw32/include/wingdi.h file + * and states: + * + * This file has no copyright assigned and is placed in the Public Domain. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + * + * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012 + */ + +#ifndef GDI_VERSION_1_X + +typedef struct tagRECT { + LONG left; + LONG top; + LONG right; + LONG bottom; +} RECT; + +typedef RECT* PRECT; +typedef RECT* LPRECT; + +typedef struct tagRGBQUAD { + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} RGBQUAD; + +typedef RGBQUAD *LPRGBQUAD; + +typedef struct tagBITMAPINFOHEADER { + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER; + +typedef struct tagBITMAPINFO { + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO; + +/* constants for the biCompression field */ +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 + +/* DIB color table identifiers */ + +#define DIB_RGB_COLORS 0 /* color table in RGBs */ +#define DIB_PAL_COLORS 1 /* color table in palette indices */ + +typedef struct tagPIXELFORMATDESCRIPTOR { + WORD nSize; + WORD nVersion; + DWORD dwFlags; + BYTE iPixelType; + BYTE cColorBits; + BYTE cRedBits; + BYTE cRedShift; + BYTE cGreenBits; + BYTE cGreenShift; + BYTE cBlueBits; + BYTE cBlueShift; + BYTE cAlphaBits; + BYTE cAlphaShift; + BYTE cAccumBits; + BYTE cAccumRedBits; + BYTE cAccumGreenBits; + BYTE cAccumBlueBits; + BYTE cAccumAlphaBits; + BYTE cDepthBits; + BYTE cStencilBits; + BYTE cAuxBuffers; + BYTE iLayerType; + BYTE bReserved; + DWORD dwLayerMask; + DWORD dwVisibleMask; + DWORD dwDamageMask; +} PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR; + +#define PFD_TYPE_RGBA 0 +#define PFD_TYPE_COLORINDEX 1 + +#define PFD_MAIN_PLANE 0 +#define PFD_OVERLAY_PLANE 1 +#define PFD_UNDERLAY_PLANE (-1) + +#define PFD_DOUBLEBUFFER 0x00000001 +#define PFD_STEREO 0x00000002 +#define PFD_DRAW_TO_WINDOW 0x00000004 +#define PFD_DRAW_TO_BITMAP 0x00000008 +#define PFD_SUPPORT_GDI 0x00000010 +#define PFD_SUPPORT_OPENGL 0x00000020 +#define PFD_GENERIC_FORMAT 0x00000040 +#define PFD_NEED_PALETTE 0x00000080 +#define PFD_NEED_SYSTEM_PALETTE 0x00000100 +#define PFD_SWAP_EXCHANGE 0x00000200 +#define PFD_SWAP_COPY 0x00000400 +#define PFD_SWAP_LAYER_BUFFERS 0x00000800 +#define PFD_GENERIC_ACCELERATED 0x00001000 +#define PFD_SUPPORT_DIRECTDRAW 0x00002000 + +#define PFD_DEPTH_DONTCARE 0x20000000 +#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000 +#define PFD_STEREO_DONTCARE 0x80000000 + +/* error codes (from winerror.h) */ +/* FIXME: these should have a trailing "L" but apparently PCPP doesn't handle that syntax */ +#define ERROR_SUCCESS 0 +#define ERROR_INVALID_PIXEL_FORMAT 2000 +#define ERROR_NO_SYSTEM_RESOURCES 1450 +#define ERROR_INVALID_DATA 13 +#define ERROR_PROC_NOT_FOUND 127 +#define ERROR_INVALID_WINDOW_HANDLE 1400 + +/* + * ShowWindow() Commands + */ +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 +#define SW_SHOWDEFAULT 10 +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 + +/** + * GetObjectType() Command + */ +#define OBJ_PEN 1 +#define OBJ_BRUSH 2 +#define OBJ_DC 3 +#define OBJ_METADC 4 +#define OBJ_PAL 5 +#define OBJ_FONT 6 +#define OBJ_BITMAP 7 +#define OBJ_REGION 8 +#define OBJ_METAFILE 9 +#define OBJ_MEMDC 10 +#define OBJ_EXTPEN 11 +#define OBJ_ENHMETADC 12 +#define OBJ_ENHMETAFILE 13 +#define OBJ_COLORSPACE 14 + +#endif /* GDI_VERSION_1_X */ + + diff --git a/make/stub_includes/win32/winwgl.h b/make/stub_includes/win32/winwgl.h index 5e9cc2fa0..c0dfb9bdb 100644 --- a/make/stub_includes/win32/winwgl.h +++ b/make/stub_includes/win32/winwgl.h @@ -6,9 +6,11 @@ * This file has no copyright assigned and is placed in the Public Domain. * No warranty is given; refer to the file DISCLAIMER.PD within this package. * - * Editions / Removals and a split (wingdi.h -> wingdi.h + winwgl.h) were made by the JogAmp Community, 2010 + * Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012 */ +#include "wingdi_types.h" + #ifndef WGL_GDI_VERSION_1_X /* layer types */ @@ -59,6 +61,13 @@ WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC); WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR); WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT); +// Runtime Link GDI/OpenGL-related routines +WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, CONST PIXELFORMATDESCRIPTOR *); +WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); +WINGDIAPI int WINAPI wglGetPixelFormat(HDC); +WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, CONST PIXELFORMATDESCRIPTOR *); +WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC); + /* --- FIXME: need to handle these entry points! WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int); WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD); |