white images

Monkey Targets Forums/Desktop/white images

Jesse(Posted 2011) [#1]
anybody getting white images?
I am getting a white image for frames for an image that is split in to 78 frames. but only GLFW. Flash and HTML5 works fine.




marksibly(Posted 2011) [#2]
Hi,

How wide is the source image?


Jesse(Posted 2011) [#3]
it's 4680x56. I'm guessing there is limit. maybe too big for the GPU buffer?


marksibly(Posted 2011) [#4]
Hi,

Yeah, max image size if probably 4096.

I didn't think of this - will come up with a fix soon!


Jesse(Posted 2011) [#5]
ok. Thanks


marksibly(Posted 2011) [#6]
Hi,

Ok, to fix this you should lay out image frames on multiple rows, top-to-bottom, left-to-right, so that total image width is <4096.

Then use something like this to load the frames:

Local atlas:=LoadImage( "blah.png" )
Local image:=atlas.GrabImage( 0,0,framew,frameh,framecount,flags )

You can store multiple anims in the same atlas too, which can result in improved performance on some targets.


Jesse(Posted 2011) [#7]
wow! Love this. I wish it worked like this in BMax.
thanks Mark!


Neuro(Posted 2012) [#8]
I'm getting white images too. Using a single 10x10 PNG image for particle effects. Have a feeling maybe due to the tiny size of it though, will try later tonight.

EDIT : on an after thought, perhaps its a transparency thing?


AdamRedwoods(Posted 2012) [#9]
white images means the opengl didn't bind the image.
might be the texture is not loading, check the image for height/width.


Neuro(Posted 2012) [#10]
Yep the image had to be power of 2 size. I just resized it to 8x8 and the color showed up.