OpenGL textures
Does anyone know why a OpenGL ES texture of a size 32x32 with transparent areas shows up like a bunch of noise, while the same texture at 64x64 renders fine ?
Do you have a picture? How are you loading it?
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
I added this guy after creating the context, and it clears up the goop. 
CGContextClearRect(ctx, CGRectMake(0, 0, width, height));

CGContextClearRect(ctx, CGRectMake(0, 0, width, height));
Using calloc rather than malloc to allocate the backing for the CGBitmapContext would achieve the same thing, possibly faster...
Actually that was to be my guess. If you followed the Apple sample code, they don't tell you to clear the memory first. I had to find that out the hard way.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Thanks for you help.
Yep', calloc does just as well.
Yep', calloc does just as well.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL ES Textures Start White | demonpants | 5 | 5,993 |
Sep 3, 2009 06:40 AM Last Post: Skorche |
|
| opengl es font textures? | cool mr croc | 0 | 2,101 |
Aug 17, 2009 04:52 AM Last Post: cool mr croc |
|
| OpenGL ES Loading Textures | soulstorm | 5 | 5,314 |
May 25, 2009 07:21 AM Last Post: soulstorm |
|
| OpenGL textures upside down? | orbian | 1 | 5,603 |
Mar 13, 2009 02:53 PM Last Post: ThemsAllTook |
|
| blitting tiled textures using openGL | jaguard | 6 | 3,610 |
Jan 12, 2009 05:16 AM Last Post: jaguard |
|

