1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Replace frameBuffer.drawBuffer from GL_DRAW_FRAMEBUFFER

to gles compatible GL_FRAMEBUFFER
This commit is contained in:
Sergey Lipskiy 2013-11-29 16:08:15 +07:00
parent c167aa970c
commit 7f49dd39c2
3 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ void FrameBuffer_Destroy()
void FrameBuffer_SaveBuffer( u32 address, u16 format, u16 size, u16 width, u16 height )
{
frameBuffer.drawBuffer = GL_DRAW_FRAMEBUFFER;
frameBuffer.drawBuffer = GL_FRAMEBUFFER;
FrameBuffer *current = frameBuffer.top;
if (current != NULL && gDP.colorImage.height > 1) {
current->endAddress = current->startAddress + (((current->width * gDP.colorImage.height) << current->size >> 1) - 1);

View File

@ -867,7 +867,7 @@ void OGL_DrawRect( int ulx, int uly, int lrx, int lry, float *color )
glDisable( GL_CULL_FACE );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
if (frameBuffer.drawBuffer != GL_DRAW_FRAMEBUFFER) {
if (frameBuffer.drawBuffer != GL_FRAMEBUFFER) {
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
} else {
@ -912,7 +912,7 @@ void OGL_DrawTexturedRect( float ulx, float uly, float lrx, float lry, float uls
glDisable( GL_CULL_FACE );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
if (frameBuffer.drawBuffer != GL_DRAW_FRAMEBUFFER) {
if (frameBuffer.drawBuffer != GL_FRAMEBUFFER) {
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
} else {

View File

@ -743,7 +743,7 @@ void gDPFillRDRAM(u32 address, s32 ulx, s32 uly, s32 lrx, s32 lry, u32 width, u3
{
if (g_bDepthClearOnly && color != DEPTH_CLEAR_COLOR)
return;
if (frameBuffer.drawBuffer == GL_DRAW_FRAMEBUFFER) {
if (frameBuffer.drawBuffer == GL_FRAMEBUFFER) {
frameBuffer.top->cleared = true;
frameBuffer.top->fillcolor = color;
}