Bug 337 : opengl video appears to be in 16bit
Last modified: 2007-02-03 09:57




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
cello
Assigned To:
fry

Attachment Type Created Size Actions
with default renderer image/jpeg 2006-05-01 16:36 15.68 KB
with opengl renderer image/jpeg 2006-05-01 16:36 16.87 KB

Description:   Opened: 2006-05-01 16:35
Using the exact same project in OpenGL vs the default mode (or even P3D),
the colors appear to be in 16bit mode (will attach screenshots to show the
difference).

Here is the code from the example, though I'm not sure how important it is
to the bug:
import processing.video.*;
import processing.opengl.*;

Capture camera;

void setup() {
size(640, 480, OPENGL);

camera = new Capture(this,Capture.list()[1], width, height, 60);

textFont(loadFont("Verdana-9.vlw"),9);
framerate(60);
}

void captureEvent(Capture camera) {
camera.read();
}

void draw()
{
image(camera, 0, 0);
text("test",10,10);
}
Additional Comment #1 From cello 2006-05-01 16:36
edit]
with default renderer
Additional Comment #2 From cello 2006-05-01 16:36
edit]
with opengl renderer
Additional Comment #3 From fry 2006-05-01 16:37
check your video card settings. i doubt this is something that's jogl/p5
are doing.
Additional Comment #4 From cello 2006-05-01 16:55
My video card settings seem to be intact, there's no way of setting a
default color depth in ATI's settings (RADEON all in wonder pro x600 pci
express).

Looking at PGraphicsGL on svn, it looks like you use the default GLCanvas()
constructor for jogl. I think it might work if you do something like the
following:

GLCapabilities capabilities = new GLCapabilities();
capabilities.setRedBits(8);
capabilities.setGreenBits(8);
capabilities.setBlueBits(8);
capabilities.setAlphaBits(8);
canvas = new GLCanvas(capabilities);

(And on a side note, calling setNumSamples(int numSamples) allows you to do
antialiasing.)
Additional Comment #5 From cello 2006-05-01 17:34
Ok, I tried hacking the library a bit, and that code bit didn't help.
Additional Comment #6 From fry 2006-05-02 06:21
the default gl settings from jogl pick up the monitor's settings. i don't want to "force" 32 bit
because that'll hose people who have 16 bit monitors anyway. i've never seen this on any of
the platforms i test, and am almost certain it's an ATI driver issue. try at a smaller screen size,
or check with your other color settings to see if it's not in fact 16 bit, but another graphics card
setting that's makign things look weird.