// IMPROVMENT: use alpha testing? might be faster
#include <org/ibex/plat/OpenGL.h>
+#include <org/ibex/graphics/PixelBuffer.h>
+#include <org/ibex/graphics/Polygon.h>
#include <org/ibex/plat/OpenGL$GLPixelBuffer.h>
#include <org/ibex/plat/OpenGL$GLPicture.h>
#include <org/ibex/plat/OpenGL$RectGLPicture.h>
} glEnd();
}
+void OpenGL$GLPixelBuffer::natFill(org::ibex::graphics::Polygon* p, jint argb) {
+ activateContext();
+ setColor(argb);
+ for(jint contour=0; contour < p->numcontours; contour++) {
+ glBegin(GL_POLYGON); {
+ for(jint i = elements(p->contours)[contour]; i < elements(p->contours)[contour+1]; i++) {
+ glVertex3f(elements(p->x)[i], elements(p->y)[i], 0.0f );
+ } glEnd();
+ }
+ }
+}
+
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) {