colors using an offscreen buffer
in
Programming Questions
•
2 years ago
Hello,
I'm using Processing from Java/Eclipse. I've just rewritten my application to use an offscreen image (PGraphics mBuffer), where I've specified:
But it seems the colors are somehow not at all like they should be. Well I think I don't have to save matrices since I'm creating a new instance everytime the buffer get's updated.
In draw() I'm using
My update method:
Anyone a hint or something what could be wrong?
regards,
johannes
I'm using Processing from Java/Eclipse. I've just rewritten my application to use an offscreen image (PGraphics mBuffer), where I've specified:
- mBuffer.pushMatrix();
- mBuffer.colorMode(PConstants.HSB, 360, 100, 100, 100);
- ...
- mBuffer.popMatrix();
But it seems the colors are somehow not at all like they should be. Well I think I don't have to save matrices since I'm creating a new instance everytime the buffer get's updated.
In draw() I'm using
- mParent.pushMatrix();
- mParent.image(mBuffer, 0, 0);
- ...
- mParent.popMatrix();
My update method:
- /** Update items as well as the buffered offscreen image. */
- private void update() {
- mBuffer = mParent.createGraphics(mParent.width, mParent.height, PConstants.JAVA2D);
- mBuffer.beginDraw();
- for (final SunburstItem item : mItems) {
- item.update(mGUI.getMappingMode(), mBuffer);
- }
- updateBuffer();
- mBuffer.endDraw();
- }
Anyone a hint or something what could be wrong?
regards,
johannes
1
