"gl_FragColor = texture2D(uTex, vTexCoord); \n\t" \
"} \n\t";
+
void OGL_EnableRunfast()
{
#ifdef ARM_ASM
config.window.width = width;
config.window.height = height;
- config.framebuffer.xpos = x;
- config.framebuffer.ypos = y;
- config.framebuffer.width = width;
- config.framebuffer.height = height;
+ if (config.framebuffer.enable!=1) {
+ config.framebuffer.xpos = x;
+ config.framebuffer.ypos = y;
+ config.framebuffer.width = width;
+ config.framebuffer.height = height;
+ }
OGL_UpdateScale();
glViewport(config.framebuffer.xpos, config.framebuffer.ypos,
//set xpos and ypos
config.window.xpos = x;
config.window.ypos = y;
- config.framebuffer.xpos = x;
- config.framebuffer.ypos = y;
//set width and height
config.window.width = (int)videoWidth;
config.window.height = (int)videoHeight;
- config.framebuffer.width = (int)videoWidth;
- config.framebuffer.height = (int)videoHeight;
+ if (config.framebuffer.enable!=1) {
+ config.framebuffer.xpos = x;
+ config.framebuffer.ypos = y;
+ config.framebuffer.width = (int)videoWidth;
+ config.framebuffer.height = (int)videoHeight;
+ }
EGL_Open(800, 480);
////
return true;
}
#endif
+
//////
#ifdef USE_SDL
}
#endif
-
bool OGL_Start()
{
// paulscode, initialize SDL
}
glGenFramebuffers(1, &OGL.framebuffer.fb);
- glGenRenderbuffers(1, &OGL.framebuffer.depth_buffer);
glGenTextures(1, &OGL.framebuffer.color_buffer);
- glBindRenderbuffer(GL_RENDERBUFFER, OGL.framebuffer.depth_buffer);
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24_OES, config.framebuffer.width, config.framebuffer.height);
glBindTexture(GL_TEXTURE_2D, OGL.framebuffer.color_buffer);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, config.framebuffer.width, config.framebuffer.height, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, NULL);
- glBindFramebuffer(GL_FRAMEBUFFER, OGL.framebuffer.fb);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glGenRenderbuffers(1, &OGL.framebuffer.depth_buffer);
+ glBindRenderbuffer(GL_RENDERBUFFER, OGL.framebuffer.depth_buffer);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24_OES, config.framebuffer.width, config.framebuffer.height);
+ glBindFramebuffer(GL_FRAMEBUFFER, OGL.framebuffer.fb);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, OGL.framebuffer.color_buffer, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, OGL.framebuffer.depth_buffer);
/////// paulscode, graphics bug-fixes
glDisable( GL_SCISSOR_TEST );
glDepthMask( GL_TRUE ); // fixes side-bar graphics glitches
-// glClearDepthf( depth ); // broken on Qualcomm Adreno
- glClearDepthf( 1.0f ); // fixes missing graphics on Qualcomm Adreno
+ glClearDepthf( depth ); // broken on Qualcomm Adreno // Should be ok on Pandora
+// glClearDepthf( 1.0f ); // fixes missing graphics on Qualcomm Adreno
glClearColor( 0, 0, 0, 1 );
glClear( GL_DEPTH_BUFFER_BIT );
OGL_UpdateDepthUpdate();
{
//OGL_DrawTriangles();
scProgramChanged = 0;
-#if 0
+#if 1
static int frames = 0;
static unsigned lastTicks = 0;
unsigned ticks = ticksGetTicks();
}
#endif
+ // if emulator defined a render callback function, call it before
+ // buffer swap
+ if (renderCallback) (*renderCallback)();
+
if (config.framebuffer.enable)
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
- glClearColor( 0, 0, 0, 1 );
- glClear( GL_COLOR_BUFFER_BIT );
-
glUseProgram(OGL.defaultProgram);
glDisable(GL_SCISSOR_TEST);
glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE); //*SEB*
glViewport(config.window.xpos, config.window.ypos, config.window.width, config.window.height);
+ glClearColor( 0, 0, 0, 1 );
+ glClear( GL_COLOR_BUFFER_BIT );
+
static const float vert[] =
{
-1.0, -1.0, +0.0, +0.0,
glBindFramebuffer(GL_FRAMEBUFFER, OGL.framebuffer.fb);
OGL_UpdateViewport();
+ OGL_UpdateCullFace();
if (scProgramCurrent) glUseProgram(scProgramCurrent->program);
OGL.renderState = RS_NONE;
}
Android_JNI_SwapWindow(); // paulscode, fix for black-screen bug
}
- // if emulator defined a render callback function, call it before
- // buffer swap
- if (renderCallback) (*renderCallback)();
-
OGL.screenUpdate = false;
if (config.forceBufferClear)
float depth = gDP.fillColor.z ;
glDisable( GL_SCISSOR_TEST );
glDepthMask( GL_TRUE ); // fixes side-bar graphics glitches
-// glClearDepthf( depth ); // broken on Qualcomm Adreno
- glClearDepthf( 1.0f ); // fixes missing graphics on Qualcomm Adreno
+ glClearDepthf( depth ); // broken on Qualcomm Adreno Should by ok on Pandora
+// glClearDepthf( 1.0f ); // fixes missing graphics on Qualcomm Adreno
glClearColor( 0, 0, 0, 1 );
glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
OGL_UpdateDepthUpdate();