Hi, I have a problem using GLGraphicSOffScreen.clear() method. I want to initialize the offscreen with a specific color first, and then I want to draw something. I tried to use the clear() method but nothing worked.
pseudo code is as follows :
GLGraphicsOffScreen glScr;
glScr.beginDraw(); glScr.clear(255); glScr.loadPixels(); for ( int y = a ; y < b ; y ++) { for ( int x = c ; x<d ; x++){ glScr.pixels[id] = color( 255 - (tex1.pixels[id] & 0xFF) ); } } glScr.updatePixels(); glScr.endDraw();
When I run the code, glScr.clear(255) doesn't work. the area outside the region(outside the double for-loop) is not updated. Can you tell me how to use the clear() method?
Hi, I'm having some trouble figuring out how to modify texture parameters.
I want to make my texture border's pixel values to be clamped to the edge (GL_CLAMP_TO_EDGE),
but I'm not that familiar with the native OpenGL, so I need some tips to solve the problem...
GLGraphics have a class named 'GLTextureParameters', and there are these 'wrappingU', 'wrappingV' fields.
But I'm not sure what values have to be entered, or how to use this class.
Or, are there any other ways to solve this problem?
Hi there! I'd been practicing some shader programming and confronted some problem here.
It seems that GLGraphics and processing's default video library are not compatible to each other.
when I create skech with P2D it works well, but GLConstants.GLGRAPHICS just don't work.
Does anyone know what the problem is?