Bug 322 : opengl mangles images and fonts, especially with video (web cam) input
Last modified: 2006-04-14 06:54




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P1
Severity:
normal

 

Reporter:
fry
Assigned To:
fry

Attachment Type Created Size Actions
Example of OPENGL PImage behaviour being a bit odd application/x-zip 2006-04-13 14:29 648 bytes
Simple sketch demonstrating texture issue in opengl/video application/zip 2006-04-13 15:58 3.33 KB

Description:   Opened: 2006-04-13 13:47
need to fix non-bound textures from mangling everything else

fix enable/disable textures for some objects
also a big problem for fonts
calling updatePixels() on each frame fixes the issue (sorta)

related to bug #150, where data is not properly unloaded from memory causing serious bloat.

please use tools -> archive sketch to post examples of the problem that i can use to debug.
Additional Comment #1 From JohnG 2006-04-13 14:29
edit]
Example of OPENGL PImage behaviour being a bit odd

This example shows that updatePixels() within OPENGL sometimes seems to make
the contents of a PImage blank, instead of updating them...
Additional Comment #2 From cello 2006-04-13 15:58
edit]
Simple sketch demonstrating texture issue in opengl/video
Additional Comment #3 From fry 2006-04-13 16:13
thanks guys.. cello i was able to get yours to replicate the bug, thanks..
now i can get this tracked down.

johng, what's the weirdness for the sketch you posted? you have to call
updatePixels() after any changes to an image before drawing it with OpenGL,
so at least on my machine it seems to be behaving properly. are you seeing
something different? loadPixels() need not be run if all the changes are
one-way (you're doing all the changes, not getting them from a cam or
something).
Additional Comment #4 From fry 2006-04-13 17:58
alright, found and fixed! thanks again for the help.
Additional Comment #5 From JohnG 2006-04-14 01:14
(In reply to comment #3)

The first updatePixels() isn't doing the right thing, in 0111 it causes the
image to be white, instead of the blue gradient the first time it's done.
Additional Comment #6 From fry 2006-04-14 04:07
that's working fine for me, i get a black screen with "creating blue gradient, but no
updatePixels()" which is correct, and then it shows up properly as a blue gradient on frame 120
when the updatePixels is called.
Additional Comment #7 From JohnG 2006-04-14 06:54
(In reply to comment #6)

Just tried 0113 and it's now working as it should, which is like you saw it.