I'm having a little problem using the HGE++ library and textures with transparency (PNG).
I tried to ask in the official forum, but it seams almost dead.
For what I could see, the code renders fine textures with transparency in 2d, but fails in 3d. And only fails on PSP (works well with OpenGL in windows).
You can see the PSP specific code here:
http://code.google.com/p/jge/source/bro ... c/JGfx.cpp
This is the initialization code:
Code: Select all
// enable alpha channel
sceGuEnable(GU_BLEND);
sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
sceGuTexFilter(GU_LINEAR,GU_LINEAR);
if (m3DEnabled)
{
sceGuDepthRange(65535,0);
sceGuEnable(GU_DEPTH_TEST);
sceGuDepthFunc(GU_GEQUAL);
sceGuEnable(GU_CULL_FACE);
sceGuEnable(GU_CLIP_PLANES);
sceGuClearColor(0x00ff0000);
sceGuClearDepth(0);
sceGuTexEnvColor(0xffffffff);
sceGuTexScale(1.0f,1.0f);
sceGuTexOffset(0.0f,0.0f);
sceGuAmbientColor(0xffffffff);
sceGumMatrixMode(GU_PROJECTION);
sceGumLoadIdentity();
sceGumPerspective(mFOV,16.0f/9.0f,0.5f,1000.0f);
//sceGumPerspective(90.0f,480.0f/272.0f,0.5f,1000.0f);
}