]> git.saurik.com Git - wxWidgets.git/commitdiff
Added the WX_GL constants
authorRobin Dunn <robin@alldunn.com>
Tue, 20 Nov 2001 02:04:03 +0000 (02:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 20 Nov 2001 02:04:03 +0000 (02:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/glcanvas/glcanvas.i
wxPython/contrib/glcanvas/msw/glcanvas.cpp
wxPython/contrib/glcanvas/msw/glcanvas.py

index d473e40801dd6d8590c2d2350f66d34804547d52..bb5620d85725b8cb93ca23c34d3168a63e54d9fb 100644 (file)
@@ -76,6 +76,26 @@ public:
 
 //---------------------------------------------------------------------------
 
+enum {
+    WX_GL_RGBA,              // use true color palette
+    WX_GL_BUFFER_SIZE,       // bits for buffer if not WX_GL_RGBA
+    WX_GL_LEVEL,             // 0 for main buffer, >0 for overlay, <0 for underlay
+    WX_GL_DOUBLEBUFFER,      // use doublebuffer
+    WX_GL_STEREO,            // use stereoscopic display
+    WX_GL_AUX_BUFFERS,       // number of auxiliary buffers
+    WX_GL_MIN_RED,           // use red buffer with most bits (> MIN_RED bits)
+    WX_GL_MIN_GREEN,         // use green buffer with most bits (> MIN_GREEN bits)
+    WX_GL_MIN_BLUE,          // use blue buffer with most bits (> MIN_BLUE bits)
+    WX_GL_MIN_ALPHA,         // use blue buffer with most bits (> MIN_ALPHA bits)
+    WX_GL_DEPTH_SIZE,        // bits for Z-buffer (0,16,32)
+    WX_GL_STENCIL_SIZE,      // bits for stencil buffer
+    WX_GL_MIN_ACCUM_RED,     // use red accum buffer with most bits (> MIN_ACCUM_RED bits)
+    WX_GL_MIN_ACCUM_GREEN,   // use green buffer with most bits (> MIN_ACCUM_GREEN bits)
+    WX_GL_MIN_ACCUM_BLUE,    // use blue buffer with most bits (> MIN_ACCUM_BLUE bits)
+    WX_GL_MIN_ACCUM_ALPHA    // use blue buffer with most bits (> MIN_ACCUM_ALPHA bits)
+};
+
+
 %typemap(python, in) int *attribList (int *temp) {
     int i;
     if (PySequence_Check($source)) {
index a7aa886d5365477e5047b2a1b7f467b167dc33f7..d112a50da6d3e6dfb433a385dd5be102794334ce 100644 (file)
@@ -889,6 +889,22 @@ SWIGEXPORT(void) initglcanvasc() {
         SWIG_globals = SWIG_newvarlink();
         m = Py_InitModule("glcanvasc", glcanvascMethods);
         d = PyModule_GetDict(m);
+        PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
+        PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
+        PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
+        PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
+        PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
+        PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
+        PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
+        PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
+        PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
+        PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
+        PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
+        PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
+        PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
+        PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
+        PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
+        PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
 
 
     wxClassInfo::CleanUpClasses();
index 76fcdd33fd395c097e52ff14c4e5fa1a2dd9dfb9..9224810a981b541a3b4fe8f461af502d68609918 100644 (file)
@@ -15,6 +15,8 @@ from events import *
 
 from streams import *
 
+from utils import *
+
 from mdi import *
 
 from frames import *
@@ -38,8 +40,6 @@ from printfw import *
 from sizers import *
 
 from filesys import *
-
-from utils import *
 import wx
 class wxGLContextPtr(wxObjectPtr):
     def __init__(self,this):
@@ -126,3 +126,19 @@ def wxGLCanvasWithContext(*_args,**_kwargs):
 
 #-------------- VARIABLE WRAPPERS ------------------
 
+WX_GL_RGBA = glcanvasc.WX_GL_RGBA
+WX_GL_BUFFER_SIZE = glcanvasc.WX_GL_BUFFER_SIZE
+WX_GL_LEVEL = glcanvasc.WX_GL_LEVEL
+WX_GL_DOUBLEBUFFER = glcanvasc.WX_GL_DOUBLEBUFFER
+WX_GL_STEREO = glcanvasc.WX_GL_STEREO
+WX_GL_AUX_BUFFERS = glcanvasc.WX_GL_AUX_BUFFERS
+WX_GL_MIN_RED = glcanvasc.WX_GL_MIN_RED
+WX_GL_MIN_GREEN = glcanvasc.WX_GL_MIN_GREEN
+WX_GL_MIN_BLUE = glcanvasc.WX_GL_MIN_BLUE
+WX_GL_MIN_ALPHA = glcanvasc.WX_GL_MIN_ALPHA
+WX_GL_DEPTH_SIZE = glcanvasc.WX_GL_DEPTH_SIZE
+WX_GL_STENCIL_SIZE = glcanvasc.WX_GL_STENCIL_SIZE
+WX_GL_MIN_ACCUM_RED = glcanvasc.WX_GL_MIN_ACCUM_RED
+WX_GL_MIN_ACCUM_GREEN = glcanvasc.WX_GL_MIN_ACCUM_GREEN
+WX_GL_MIN_ACCUM_BLUE = glcanvasc.WX_GL_MIN_ACCUM_BLUE
+WX_GL_MIN_ACCUM_ALPHA = glcanvasc.WX_GL_MIN_ACCUM_ALPHA