FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 705 : PImage set() requires updatePixels() with OpenGL
Last modified: 2008-11-24 12:41
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
ASSIGNED
Resolution:
-
Pr
i
ority:
P3
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
kraelen
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Complete sketch folder (includes images used in the sketch)
application/zip
2007-12-23 11:46
389.92 KB
Screenshot of sketch when first run
image/jpeg
2007-12-23 11:47
75.50 KB
Screenshot of sketch after mouse click
image/jpeg
2007-12-23 11:48
73.39 KB
Description
: Opened: 2007-12-23 11:44
Processing 0135 Beta
Windows XP with SP2
AMD Dual Core 3Ghz (AM2)
Nvidia 8800GT with Latest Driver
PImage set() only works when the method is called from setup, when the
method is called after a mouse click the method appears to skip the 2 lines
which use set().
If I don't call land.reset in setup() and click the mouse to call
land.reset() then the texture doesn't seem to be loaded at all, the land is
totally black.
No errors are stated in PDE
Image after sketch is first run. Everything is fine.
http://kraelen.co.uk/files/ProcessingBug/FirstRun.jpg
Image after mouse click. Land changes, but texture stays the same.
http://kraelen.co.uk/files/ProcessingBug/AfterMouseClick.jpg
Images after mouse click but land.reset() not called in setup(). Land is black.
http://kraelen.co.uk/files/ProcessingBug/NotCalledInSetup.jpg
Files (They are both the same, but the rar file is smaller. I wasn't sure
which software you use)
http://kraelen.co.uk/files/ProcessingBug/DynamicTexture.rar
http://kraelen.co.uk/files/ProcessingBug/DynamicTexture.zip
**What SHOULD happen**:
-Load sketch
-Setup() loads textures into PImages
-Setup() calls land.reset()
-land.reset() sets PImage.tex to the grass texture
-land.reset() changes the land with perlin noise
-land.reset() sets certain points of the PImage.tex to beach texture
depending on height
-Draw() draws the land and the water
-User clicks mouse button
-land.reset() is called again
-land.reset() sets PImage.tex to the grass texture
-land.reset() sets certain points of the PImage.tex to beach texture
depending on height
-Draw() draws the land and the water
**What ACTUALLY happens**:
When the sketch is run land.reset() works correctly when called from setup()
Everything is fine until the user clicks the mouse button.
-User clicks mouse button
-land.reset() is called again
-land.reset() this time FAILS to set tex with grassBase
-land.reset() DOES change the land with perlin noise
-land.reset() this time FAILS to set certain points of the PImage.tex to
beach texture depending on height
-Draw() draws the land and the water
Additional Comment
#1 From kraelen 2007-12-23 11:46
edit
]
Complete sketch folder (includes images)
Additional Comment
#2 From kraelen 2007-12-23 11:47
edit
]
Screenshot of sketch when first run
Additional Comment
#3 From kraelen 2007-12-23 11:48
edit
]
Screenshot of sketch after mouse click
Additional Comment
#4 From fry 2007-12-24 11:03
in the meantime, just call updatePixels() after you've made changes. set()
should be calling it on its own.
This bug is now being tracked
here
.