How to merge two textures. (noob question).
in
Programming Questions
•
3 years ago
I'm trying to use some GLSL but I have a basic problem.
I have created 4 GLTextures, which I need to render on top of each other:
1.- render 2 textures
2.- apply a GLSL filter
3.- render the other two textures on top of the reulting texture,
4.- apply another filter.
I tryed using an GLGraphicsOffScreen, but I cannot render a QUAD for rendering the texture, but when I do
I get the error that beginShape(int) is not allowed. Am I missing something?
Is there a way to place a texture on top of another texture? I'm confused on OpenGl and processing OpenGL functions on their objects... maybe a break will help.
thanks in advanced.
I have created 4 GLTextures, which I need to render on top of each other:
1.- render 2 textures
2.- apply a GLSL filter
3.- render the other two textures on top of the reulting texture,
4.- apply another filter.
I tryed using an GLGraphicsOffScreen, but I cannot render a QUAD for rendering the texture, but when I do
- gCanvas.beginShape(QUAD_STRIP);
gCanvas.texture(firstTex); - gCanvas.vertex(0, 0 0, 0);
- gCanvas.vertex(80, 5, 100, 0);
- gCanvas.vertex(95, 90, 100, 100);
- gCanvas.vertex(40, 95, 0, 100);
- gCanvas.endShape();
I get the error that beginShape(int) is not allowed. Am I missing something?
Is there a way to place a texture on top of another texture? I'm confused on OpenGl and processing OpenGL functions on their objects... maybe a break will help.
thanks in advanced.
1