2003/09/19 05:26:47
[org.ibex.core.git] / src / org / xwt / plat / OpenGL.cc
index 31b5228..c7a1002 100644 (file)
@@ -4,7 +4,7 @@
 // IMPROVMENT: use alpha testing? might be faster
 
 #include <org/xwt/plat/OpenGL.h>
-#include <org/xwt/plat/OpenGL$GLDoubleBuffer.h>
+#include <org/xwt/plat/OpenGL$GLPixelBuffer.h>
 #include <org/xwt/plat/OpenGL$GLPicture.h>
 #include <org/xwt/plat/OpenGL$RectGLPicture.h>
 #include <org/xwt/plat/OpenGL$SquareGLPicture.h>
@@ -56,7 +56,7 @@ void OpenGL::natInit() {
     version = JvNewStringLatin1(s==0 ? "" : (char*)s);
 }
 
-void OpenGL$GLDoubleBuffer::drawableInit(jint width, jint height) {
+void OpenGL$GLPixelBuffer::drawableInit(jint width, jint height) {
     glClearColor (0.3f, 0.7f, 1.0f, 1.0f);
     glClearDepth( 0.0f );
     glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
@@ -77,7 +77,7 @@ void OpenGL$GLDoubleBuffer::drawableInit(jint width, jint height) {
     checkGLError();
 }
 
-void OpenGL$GLDoubleBuffer::setColor(jint argb) {
+void OpenGL$GLPixelBuffer::setColor(jint argb) {
     float alpha = ((argb >> 24) & 0xff) / 255.0;
     float red   = ((argb >> 16) & 0xff) / 255.0;
     float green = ((argb >>  8) & 0xff) / 255.0;
@@ -85,7 +85,7 @@ void OpenGL$GLDoubleBuffer::setColor(jint argb) {
     glColor4f(red,green,blue,alpha);
 }
 
-void OpenGL$GLDoubleBuffer::fillTrapezoid(jint x1, jint x2, jint y1, jint x3, jint x4, jint y2, jint color) {
+void OpenGL$GLPixelBuffer::fillTrapezoid(jint x1, jint x2, jint y1, jint x3, jint x4, jint y2, jint color) {
     activateContext();
     setColor(color);
     glBegin(GL_QUADS); 
@@ -96,7 +96,7 @@ void OpenGL$GLDoubleBuffer::fillTrapezoid(jint x1, jint x2, jint y1, jint x3, ji
     glEnd();
 }
 
-void OpenGL$GLDoubleBuffer::fillRect(jint x1, jint y1, jint x2, jint y2,jint color) {
+void OpenGL$GLPixelBuffer::fillRect(jint x1, jint y1, jint x2, jint y2,jint color) {
     activateContext();
     setColor(color);
     glBegin(GL_QUADS); 
@@ -107,7 +107,7 @@ void OpenGL$GLDoubleBuffer::fillRect(jint x1, jint y1, jint x2, jint y2,jint col
     glEnd();
 }
 
-void OpenGL$GLDoubleBuffer::setClip(jint x1, jint y1, jint x2, jint y2) {
+void OpenGL$GLPixelBuffer::setClip(jint x1, jint y1, jint x2, jint y2) {
     //fprintf(stderr,"setClip: %d %d %d %d\n",x1,y1,x2,y2);
     if(x1==0 && y1==0 && x2==width && y2==height) {
         if(glScissorEnabled) {
@@ -129,7 +129,7 @@ void OpenGL$GLDoubleBuffer::setClip(jint x1, jint y1, jint x2, jint y2) {
     checkGLError();
 }
 
-void OpenGL$GLDoubleBuffer::resetClip() {
+void OpenGL$GLPixelBuffer::resetClip() {
     activateContext();
     if(glScissorEnabled) {
         glDisable(GL_SCISSOR_TEST);