We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Weird (blueish) Texture Rendering with GLGraphics
Page Index Toggle Pages: 1
Weird (blueish?) Texture Rendering with GLGraphics (Read 650 times)
Weird (blueish?) Texture Rendering with GLGraphics
Jan 7th, 2009, 1:40pm
 
Hi, i hope someone can help me with this:

I am quite happy with GLGraphics and it's GLSL capabilities. But somehow every Texture is rendered quite odd. Here is a little example:



import codeanticode.glgraphics.*;
import processing.opengl.*;

GLTexture tex;

void setup()
{
 size(800,600, GLConstants.GLGRAPHICS);
 tex = new GLTexture(this, "test.jpg");
}

void draw()
{
 background(0);
 image(tex,0,0);
}


I asume, that it should simply draw test.jpg ( http://mix.crea-bmb.de/test.jpg ) on the screen. But it turns out to be some blue-channel-only thing ( http://mix.crea-bmb.de/blue.png ). If i turn the background to red you see, that it also blends the texture with the background ( http://mix.crea-bmb.de/red.png ).

It also happens in more complex examples. Shaders work great though!

I run a Powerbook G4 1.5Ghz with a ATI Mobility Radeon 9700 on Leopard 10.5.6. Processing 1.0.1, GLGraphics 0.8.9.4 (latest)

Hope something has an answer for this strange behaviour!

Many thanks in advance!
Re: Weird (blueish?) Texture Rendering with GLGrap
Reply #1 - Jan 8th, 2009, 8:49pm
 
hi,

I think I found the bug in glgraphics that causes this problem. The strange thing is that it doesn't show up in the video cards I have been using so far... Try this version of glgraphics:

http://users.design.ucla.edu/~acolubri/test/glgraphics-20090108.zip

and let me know what happens.
Re: Weird (blueish?) Texture Rendering with GLGrap
Reply #2 - Jan 8th, 2009, 10:11pm
 
hi,

thanks for the fix. it's getting better! the texture doesn't blend with the background anymore but the colors aren't right yet!

http://mix.crea-bmb.de/update.png
compared to the source image: http://mix.crea-bmb.de/test.jpg

maybe the final fix is near Smiley thanks in advance!

Re: Weird (blueish?) Texture Rendering with GLGrap
Reply #3 - Jan 9th, 2009, 5:07pm
 
What happens when you try the following code. Are the colors ok?

Code:

import processing.opengl.*;

PImage img;

void setup()
{
size(800,600, OPENGL);
img = loadImage("test.jpg");
}

void draw()
{
background(0, 255, 0);
beginShape(QUADS);
texture(img);
vertex(0, 0, 0, 0, 0);
vertex(width, 0, 0, img.width, 0);
vertex(width, height, img.width, img.height);
vertex(0, height, 0, 0, img.height);
endShape();
}
Re: Weird (blueish?) Texture Rendering with GLGrap
Reply #4 - Jan 10th, 2009, 12:05pm
 
yes, everything looks fine with this code.
Page Index Toggle Pages: 1