For instance, the code below shades only some faces of the cube and even then, only partially.
- Code: Select all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23E2DSURFACEINFO lockinfo;
unsigned char *bufptr;
bufptr = texture.Lock(&lockinfo);
if (bufptr)
{
int x, y;
bufptr += lockinfo.bufferoffset;
for (y = 0; y < height; y++)
{
for (x = 0; x < width; x++)
{
if (lockinfo.pixelformat == EDSP_INDEXED8)
*bufptr = 255;
else if (lockinfo.pixelformat == EDSP_TRUE12 || lockinfo.pixelformat == EDSP_TRUE16)
*((unsigned short *)(bufptr)) = 255;
else if (lockinfo.pixelformat == EDSP_TRUE32)
*((unsigned long *)(bufptr)) = 255;
bufptr += lockinfo.xpitch;
}
bufptr += lockinfo.ypitch - texture.GetWidth() * lockinfo.xpitch;
}
texture.Unlock();
}23 lines; 15 keywds; 5 nums; 100 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
However, when I use the code to directly load a texture from a file, the textures are mapped perfectly. I'm using an N95 and the Symbian OpenGL ES examples work perfectly. What could be the difference between the edge renderer texture format and that of OpenGL ES?
Another thing that I noticed was that while using the Edgelib renderer, I was able to lock the texture, change its contents and the cube would show those chanegs. When I switched to OpenGL ES however, I'm not able to change the texture after the 1st binding.
Any help would be greatly appreciated
Cheers!
