aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl/gldefs.h
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2004-10-15 23:33:45 +0000
committerChien Yang <[email protected]>2004-10-15 23:33:45 +0000
commit14b52db7ab4c4be2bd39ff944cec056c291f999a (patch)
tree3bf6c274a97828b9ca4cd28de6ed602dfeac9af3 /src/native/ogl/gldefs.h
parentcdf24368541b18e5ffc56f5c9449310e874f4a2f (diff)
Issue number: 4, 28, 71 and 76
Windows OpenGL only : This fix will use hardware Pbuffer for offScreenBuffer rendering if the graphics hardware support it, else BitMap is use as a fallback. 1) Fixed issue 4 - Speed of OffScreen Canvas3D 2) Fixed issue 28 - Combine Mode & Missing Texture in OffScreen snapshot on Win/XP 3) Fixed issue 71 - OGL: OffScreen canvas ignore GraphicsConfigTemplate under windows. 4) Fixed issue 76 - OffScreen rendering should use Pbuffer on Windows / OpenGL 5) Cleanup native ChoosePixelFormat code. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@56 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/ogl/gldefs.h')
-rw-r--r--src/native/ogl/gldefs.h67
1 files changed, 45 insertions, 22 deletions
diff --git a/src/native/ogl/gldefs.h b/src/native/ogl/gldefs.h
index 6658201..a79762a 100644
--- a/src/native/ogl/gldefs.h
+++ b/src/native/ogl/gldefs.h
@@ -72,6 +72,7 @@
#ifndef D3D
#include <GL/gl.h>
+#include "wglext.h"
#include "gl_1_2.h"
#include "glext.h"
#endif
@@ -389,27 +390,6 @@ extern int glXgetVideoResizeSUN( Display *, GLXDrawable, float *);
#define APIENTRY
#endif
-#ifdef WIN32
-
-/* declare function prototype for WGL related functions*/
-typedef const char * (APIENTRY * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (HDC hdc);
-typedef BOOL (APIENTRY * PFNWGLCHOOSEPIXELFORMATEXTPROC)(HDC hdc,
- const int *piAttribIList,
- const FLOAT *pfAttriFList,
- UINT nMaxFormats,
- int *piFormats,
- UINT *nNumFormats);
-typedef BOOL (APIENTRY * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)(HDC hdc,
- int iPixelFormat,
- int iLayerPlane,
- UINT nAttributes,
- const int *piAttributes,
- int *piValues);
-
-
-
-#endif /* WIN32 */
-
/* define function prototypes */
typedef void (APIENTRY * MYPFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green,
GLclampf blue, GLclampf alpha);
@@ -641,5 +621,48 @@ typedef struct {
MYPFNGLTEXFILTERFUNCSGI glTexFilterFuncSGIS;
} GraphicsContextPropertiesInfo;
-#endif /* J3D_BUILDVERTICES */
+
+#ifdef WIN32
+
+/* define the structure to hold the info. of a pixel format */
+typedef struct PixelFormatInfoRec PixelFormatInfo;
+
+struct PixelFormatInfoRec {
+ int onScreenPFormat; /* PixelFormat for onScreen */
+ int offScreenPFormat; /* PixelFormat for offScreen */
+ GLboolean supportARB; /* TRUE if ARB is supported */
+ GLboolean supportPbuffer; /* TRUE if Pbuffer is supported */
+ char* supportedExtensions; /* list of supported ARB extensions */
+ /* handle to ARB functions */
+ PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
+ PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
+ PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
+ PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
+ PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
+ PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
+ PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
+
+ /* TODO include multi-samples buffer */
+
+};
+
+#endif /* WIN32 */
+
+/* define the structure to hold the info. of a offScreen buffer */
+typedef struct OffScreenBufferInfoRec OffScreenBufferInfo;
+
+struct OffScreenBufferInfoRec {
+ GLboolean isPbuffer; /* GL_TRUE if Pbuffer is used. */
+
+#if defined(SOLARIS) || defined(__linux__)
+#endif
+
+#ifdef WIN32
+ HPBUFFERARB hpbuf; /* Handle to the Pbuffer */
+#endif /* WIN32 */
+
+};
+
+
+#endif /* D3D */
#endif /* _Java3D_gldefs_h_ */