{"", NULL, 0},
{"#Framebuffer Settings:",NULL,0},
-// {"framebuffer enable", &config.framebuffer.enable, 0},
+ {"framebuffer enable", &config.framebuffer.enable, 0},
{"framebuffer bilinear", &config.framebuffer.bilinear, 0},
{"framebuffer width", &config.framebuffer.width, 400},
{"framebuffer height", &config.framebuffer.height, 240},
{"", NULL, 0},
{"#Frame skip:", NULL, 0},
- {"auto frameskip", &config.autoFrameSkip, 0},
- {"max frameskip", &config.maxFrameSkip, 0},
+ {"auto frameskip", &config.autoFrameSkip, 1},
+ {"max frameskip", &config.maxFrameSkip, 3},
{"target FPS", &config.targetFPS, 20},
{"frame render rate", &config.frameRenderRate, 1},
{"vertical sync", &config.verticalSync, 0},
"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);
}
#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 );
+ 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);
static const float vert[] =
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)
eglSettings[CFG_VSYNC] = 0;
eglSettings[CFG_FSAA] = 0;
eglSettings[CFG_FPS] = 0;
- eglSettings[CFG_RED_SIZE] = 5;
- eglSettings[CFG_GREEN_SIZE] = 6;
- eglSettings[CFG_BLUE_SIZE] = 5;
+ eglSettings[CFG_RED_SIZE] = 0;
+ eglSettings[CFG_GREEN_SIZE] = 0;
+ eglSettings[CFG_BLUE_SIZE] = 0;
eglSettings[CFG_ALPHA_SIZE] = 0;
eglSettings[CFG_DEPTH_SIZE] = 16;
- eglSettings[CFG_BUFFER_SIZE] = 16;
+ eglSettings[CFG_BUFFER_SIZE] = 0;
eglSettings[CFG_STENCIL_SIZE] = 0;
/* Parse INI file */
{
EGLBoolean result;
int attrib = 0;
- EGLint ConfigAttribs[23];
+ EGLint ConfigAttribs[27];
ConfigAttribs[attrib++] = EGL_RED_SIZE; /* 1 */
ConfigAttribs[attrib++] = eglSettings[CFG_RED_SIZE]; /* 2 */
ConfigAttribs[attrib++] = (eglSettings[CFG_FSAA] > 0) ? 1 : 0; /* 20 */
ConfigAttribs[attrib++] = EGL_SAMPLES; /* 21 */
ConfigAttribs[attrib++] = eglSettings[CFG_FSAA]; /* 22 */
- ConfigAttribs[attrib++] = EGL_NONE; /* 23 */
+ ConfigAttribs[attrib++] = EGL_NATIVE_RENDERABLE; /* 23 */
+ ConfigAttribs[attrib++] = EGL_FALSE; /* 24 */
+ ConfigAttribs[attrib++] = EGL_LEVEL; /* 25 */
+ ConfigAttribs[attrib++] = 0; /* 26 */
+ ConfigAttribs[attrib++] = EGL_NONE; /* 27 */
result = peglChooseConfig( eglDisplay, ConfigAttribs, eglConfigs, totalConfigsIn, &totalConfigsFound );
if (result != EGL_TRUE || totalConfigsFound == 0)