diff options
author | Sven Gothel <[email protected]> | 2000-11-18 06:43:49 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2000-11-18 06:43:49 +0000 |
commit | 880653d31a8f1ff8384fdbc75b84934bceecfdb8 (patch) | |
tree | bdafb71416f176d2a4b73bf716c9dc3f13685a8b /CNativeCode/misc |
Initial revision
Diffstat (limited to 'CNativeCode/misc')
-rw-r--r-- | CNativeCode/misc/context.h | 18 | ||||
-rw-r--r-- | CNativeCode/misc/glx_pbuffers.txt | 80 |
2 files changed, 98 insertions, 0 deletions
diff --git a/CNativeCode/misc/context.h b/CNativeCode/misc/context.h new file mode 100644 index 0000000..cee1d75 --- /dev/null +++ b/CNativeCode/misc/context.h @@ -0,0 +1,18 @@ + + +typedef struct GL4JCtxData { + int handle; // the java side - handle + void * glContext; // the orig. GL context + void * vertex; // + void * normal; + void * color; + void * index; + void * texcoords[]; + void * edgeflag; +}; + +#define MAX_GL4J_CONTEXT = 100; +extern GL4JCtxData gl4jCtxData[MAX_GL4J_CONTEXT]; + +GL4JCtxData findGL4JCtxData(void * glcontext); +void releaseGL4JCtxData(GL4JCtxData * data); diff --git a/CNativeCode/misc/glx_pbuffers.txt b/CNativeCode/misc/glx_pbuffers.txt new file mode 100644 index 0000000..126e339 --- /dev/null +++ b/CNativeCode/misc/glx_pbuffers.txt @@ -0,0 +1,80 @@ + [Add the following to section 3.2.3 on Offscreen Rendering] + + To create a GLXPbuffer call: + + GLXPbuffer glXCreateGLXPbufferSGIX(Display *dpy, + GLXFBConfig config, + unsigned int width, + unsigned int height, + int *attrib_list); + + This creates a single GLXPbuffer and returns its XID. <width> and <height> + specify the pixel width and height of the rectangular pbuffer and + <attrib_list> specifies a list of attributes for the pbuffer. Currently + only three attributes can be specified in <attrib_list>: + GLX_PRESERVED_CONTENTS_SGIX, GLX_LARGEST_PBUFFER_SGIX and + GLX_DIGITAL_MEDIA_PBUFFER_SGIX. + + [Add following the section on the GLX_PRESERVED_CONTENTS_SGIX attrib] + + The resulting pbuffer, when made current, will contain color buffers + and ancillary buffers as specified by <config>. It is possible to create + a pbuffer with back buffers and to swap the front and back buffers by + calling glXSwapBuffers. Note that some pbuffers use framebuffer resources + so applications should consider deallocating them when they are not in use. + + If the GLX_DIGITAL_MEDIA_PBUFFER_SGIX attribute is set to True in + <attrib_list>, then one or more of the pbuffer's color or ancillary + buffers may be shared with those of a currently associated DMbuffer. + Buffers described by the pbuffer's GLXFBConfig which are not defined + by the DMbuffer, are GLX resources that remain associated with the + DM pbuffer until it is destroyed. + An implementation may fail glXCreateGLXPbufferSGIX and generate a + BadMatch error when the sepcified <config> does not describe a + drawable that is compatible with any supported DMbuffers. + + The GLXPbuffer is associated with a DMbuffer by calling: + + Bool glXAssociateDMPbufferSGIX(Display *dpy, + GLXPbufferSGIX pbuffer, + DMparams *params, + DMbuffer dmbuffer); + + The parameter <display> specifies a connection to an X server, and must + match the display used to create the GLXPbuffer <pbuffer>. The + DMparams <params> arg specifies the digital media characteristics + of the <dmbuffer> that will be associated with the DM pbuffer. + If glXAssociateDMbufferSGIX succeeds, any previously associated DMbuffer + is released and a value of True is returned. Subsequent GL commands + effect <dmbuffer> as they would any standard pbuffer. If a newly + released DMbuffer has no remaining clients, its buffers will also be freed. + A BadMatch error is generated when the specified DMparams or DMbuffer + are not compatible with the <pbuffer>, and a value of False is returned. + + Before the DM pbuffer can be made current to a GLXContext, it must + be associated with a compatible DMbuffer. glXMakeCurrentReadSGI will + return False and generate a GLXBadDrawable error when a DM pbuffer + drawable has no associated DMbuffer. + + A GLXPbuffer is destroyed by calling: + + void glXDestroyGLXPbufferSGIX(Display *dpy, + GLXPbuffer pbuf); + + The GLXPbuffer will be destroyed once it is no longer current to any + client. When a GLXPbuffer is destroyed, any memory resources that + attached to it, are freed, and its XID is made available for reuse. + Associated DMbuffers are released, and if they no lonnger have a + client, are also freed. + +Errors + + XXX - not complete yet + +New State + + None. + +New Implementation Dependent State + + None. |