aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-04 10:51:16 +0200
committerSven Gothel <[email protected]>2011-09-04 10:51:16 +0200
commitc8e147620c55ff16e9d687bb36a4374e97e82176 (patch)
tree3151189f2750801baf6ae1918adc3ff17b9c6833 /make
parent3ea949b6a14c1ba631cb41b7439af86b21db4c05 (diff)
Complete translucency support for Win32 - tested w/ NEWT
https://jogamp.org/bugzilla/show_bug.cgi?id=517 - Adding some Windows DWM entries to GDI (manual) for translucency support - Add translucency setting in WindowsWGLGraphicsConfiguration*
Diffstat (limited to 'make')
-rw-r--r--make/build-nativewindow.xml10
-rw-r--r--make/config/nativewindow/win32-lib.cfg3
-rwxr-xr-xmake/scripts/java-win64-dbg.bat3
-rwxr-xr-xmake/scripts/tests-x64.bat4
-rw-r--r--make/stub_includes/win32/WindowsDWM.h33
-rw-r--r--make/stub_includes/win32/window-lib.c1
-rw-r--r--make/stub_includes/win32/windows.h2
7 files changed, 50 insertions, 6 deletions
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index bf8c8cdd9..b13e9b0ff 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -224,7 +224,9 @@
config="${windowlib.os.cfg}"
includeRefid="stub.includes.fileset.platform"
literalInclude="${stub.includes.gluegen.gg}"
- emitter="com.jogamp.gluegen.JavaEmitter">
+ emitter="com.jogamp.gluegen.JavaEmitter"
+ debug="false"
+ dumpCPP="false">
<classpath refid="gluegen.classpath" />
</gluegen>
</target>
@@ -576,6 +578,7 @@
<patternset id="c.src.files.windows">
<include name="${rootrel.generated.c}/Windows/GDI*.c"/>
<include name="${rootrel.src.c}/windows/GDImisc.c"/>
+ <include name="${rootrel.src.c}/windows/WindowsDWM.c"/>
<include name="${rootrel.src.c}/NativewindowCommon.c"/>
</patternset>
@@ -610,9 +613,10 @@
<sysincludepath path="${stub.includes.gluegen.cc}"/>
<!-- This is for the generated headers for handwritten C code -->
<includepath path="${src.generated.c}" />
- <includepath path="${src.generated.c}/X11" if="isX11"/>
- <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
+ <includepath path="${src.generated.c}/X11" if="isX11"/>
+ <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
<includepath path="${src.generated.c}/Windows" if="isWindows"/>
+ <includepath path="${src.c}/windows" if="isWindows"/>
<includepath path="${src.c}"/>
<!-- This must come last to not override real include paths -->
diff --git a/make/config/nativewindow/win32-lib.cfg b/make/config/nativewindow/win32-lib.cfg
index b8886bdac..b8ff42473 100644
--- a/make/config/nativewindow/win32-lib.cfg
+++ b/make/config/nativewindow/win32-lib.cfg
@@ -8,6 +8,7 @@ JavaClass GDI
Style AllStatic
Opaque boolean BOOL
+Opaque int HRESULT
Opaque long HANDLE
Opaque long PROC
Opaque long HINSTANCE
@@ -16,6 +17,7 @@ Opaque long HBITMAP
Opaque long HDC
Opaque long HGDIOBJ
Opaque long HGLRC
+Opaque long HRGN
Opaque long HPBUFFERARB
Opaque long HPBUFFEREXT
Opaque long void **
@@ -32,6 +34,7 @@ CustomCCode #undef WIN32_LEAN_AND_MEAN
CustomCCode #include <gluegen_stdint.h>
CustomCCode #include <gluegen_stddef.h>
CustomCCode #include <wingdi.h>
+CustomCCode #include "WindowsDWM.h"
CustomCCode extern HINSTANCE GetApplicationHandle();
diff --git a/make/scripts/java-win64-dbg.bat b/make/scripts/java-win64-dbg.bat
index 29828e785..3a425a479 100755
--- a/make/scripts/java-win64-dbg.bat
+++ b/make/scripts/java-win64-dbg.bat
@@ -21,7 +21,8 @@ REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all"
REM set D_ARGS="-Djogl.debug=all" "-Dnativewindow.debug=all"
REM set D_ARGS="-Djogl.debug=all"
REM set D_ARGS="-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
-set D_ARGS="-Djogl.debug.DebugGL" "-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.GLSLCode"
+REM set D_ARGS="-Djogl.debug.DebugGL" "-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.GLSLCode"
+set D_ARGS="-Djogl.debug.GraphicsConfiguration" "-Djogl.debug.CapabilitiesChooser"
REM set D_ARGS="-Djogl.debug.GLContext" "-Dnewt.debug=all"
REM set D_ARGS="-Dnewt.debug.Window" "-Dnativewindow.debug.TraceLock"
REM set D_ARGS="-Dnativewindow.debug.TraceLock"
diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat
index 4ea678536..e76666289 100755
--- a/make/scripts/tests-x64.bat
+++ b/make/scripts/tests-x64.bat
@@ -10,7 +10,7 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLPro
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT %1 %2 %3
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %1 %2 %3
+scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %1 %2 %3 %4 %5 %6
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT -time 5000
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsGLJPanelAWT -time 5000
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01
@@ -78,5 +78,5 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGPUMe
REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01
-scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %1 %2 %3 %4
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %1 %2 %3 %4
diff --git a/make/stub_includes/win32/WindowsDWM.h b/make/stub_includes/win32/WindowsDWM.h
new file mode 100644
index 000000000..357602dae
--- /dev/null
+++ b/make/stub_includes/win32/WindowsDWM.h
@@ -0,0 +1,33 @@
+#ifndef WGL_DWM_VERSION_1_X
+
+#define DWM_BB_ENABLE 1
+#define DWM_EC_DISABLECOMPOSITION 0
+#define DWM_EC_ENABLECOMPOSITION 1
+
+typedef struct tagDWM_BLURBEHIND {
+ DWORD dwFlags;
+ int fEnable; /* BOOL */
+ HRGN hRgnBlur;
+ int fTransitionOnMaximized; /* BOOL */
+} DWM_BLURBEHIND, *PDWM_BLURBEHIND;
+
+typedef struct tagMARGINS {
+ int cxLeftWidth;
+ int cxRightWidth;
+ int cyTopHeight;
+ int cyBottomHeight;
+} MARGINS, *PMARGINS;
+
+#endif /* WGL_DWM_VERSION_1_X */
+
+#ifndef WGL_DWM_VERSION_1_X
+#define WGL_DWM_VERSION_1_X
+
+BOOL DwmIsExtensionAvailable();
+BOOL DwmIsCompositionEnabled();
+BOOL DwmEnableComposition( UINT uCompositionAction );
+BOOL DwmEnableBlurBehindWindow(HWND, CONST DWM_BLURBEHIND *);
+BOOL DwmExtendFrameIntoClientArea(HWND, CONST MARGINS *);
+
+#endif /* WGL_DWM_VERSION_1_X */
+
diff --git a/make/stub_includes/win32/window-lib.c b/make/stub_includes/win32/window-lib.c
index c5c5d37b9..25355cdcd 100644
--- a/make/stub_includes/win32/window-lib.c
+++ b/make/stub_includes/win32/window-lib.c
@@ -1,2 +1,3 @@
#include <windows.h>
#include <wingdi.h>
+#include <WindowsDWM.h>
diff --git a/make/stub_includes/win32/windows.h b/make/stub_includes/win32/windows.h
index c30f99ebd..f2f3900ba 100644
--- a/make/stub_includes/win32/windows.h
+++ b/make/stub_includes/win32/windows.h
@@ -26,6 +26,7 @@ typedef HANDLE HMODULE;
typedef HANDLE HINSTANCE;
typedef HANDLE HPALETTE;
typedef HANDLE HWND;
+typedef HANDLE HRGN;
typedef __int32 LONG;
typedef const char* LPCSTR;
typedef void* LPVOID;
@@ -38,6 +39,7 @@ typedef unsigned short WORD;
typedef unsigned short ATOM;
typedef intptr_t DWORD_PTR;
typedef intptr_t* PDWORD_PTR;
+typedef __int32 HRESULT;
/* Necessary handle typedefs for parsing wglext.h */