[aquaria] THE GUILY (was Unofficial PSP port)
Andrew Church
achurch+aquaria at achurch.org
Fri Jun 18 05:54:45 EDT 2010
>> Are you absolutely sure you turned off the fbuffer setting in the
>> xml file?
>>
>yes, and i've also disabled it in the make flags. But could be a
>problem in our OpenGL implementation. I must try to reproduce the
>darkLayer object in a small example so i can try it
In that case, you might want to check whether there's a problem with
(1) glCopyTexImage2D() or (2) glBlendFunc(GL_ZERO,GL_SRC_COLOR) in your
GL implementation. Try this: Go into DarkLayer::preRender() and, right
after the glCopyTexImage2D() call, add something like this (not tested,
just an example):
char *data = new char[quality*quality*4];
glGetTexImage(GL_TEXTURE_2D, 0, GL_RBGA, GL_UNSIGNED_BYTE, data);
FILE *f = fopen("test", "w");
fwrite(data, quality*quality*4, 1, f);
fclose(f);
delete[] data;
That should write the contents of the dark layer texture to the file "test"
in the game's data directory. Check that file using a hex editor or
similar, and it should be full of 0xFF 0xFF 0xFF 0xFF (i.e., opaque white)
for the title screen.
- If it's something else, like all zeros or 0x00 0x00 0x00 0xFF (opaque
black), there may be a bug in your glCopyTexImage2D().
- If it's correct, try going to DarkLayer::render() and changing
glEnable(GL_BLEND) to glDisable(GL_BLEND). If that causes the screen
to go all white instead of all black, then your GL implementation (or
possibly your video card) has buggy or incomplete blending support.
FWIW, I can confirm that the non-framebuffer version of the dark layer
code works correctly, since I haven't (yet?) implemented the OpenGL
framebuffer extension on the PSP and the dark layer still renders fine.
--Andrew Church
achurch at achurch.org
http://achurch.org/
More information about the aquaria
mailing list