mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Replace frameBuffer.drawBuffer from GL_DRAW_FRAMEBUFFER
to gles compatible GL_FRAMEBUFFER
This commit is contained in:
parent
c167aa970c
commit
7f49dd39c2
|
@ -247,7 +247,7 @@ void FrameBuffer_Destroy()
|
||||||
|
|
||||||
void FrameBuffer_SaveBuffer( u32 address, u16 format, u16 size, u16 width, u16 height )
|
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;
|
FrameBuffer *current = frameBuffer.top;
|
||||||
if (current != NULL && gDP.colorImage.height > 1) {
|
if (current != NULL && gDP.colorImage.height > 1) {
|
||||||
current->endAddress = current->startAddress + (((current->width * gDP.colorImage.height) << current->size >> 1) - 1);
|
current->endAddress = current->startAddress + (((current->width * gDP.colorImage.height) << current->size >> 1) - 1);
|
||||||
|
|
|
@ -867,7 +867,7 @@ void OGL_DrawRect( int ulx, int uly, int lrx, int lry, float *color )
|
||||||
glDisable( GL_CULL_FACE );
|
glDisable( GL_CULL_FACE );
|
||||||
glMatrixMode( GL_PROJECTION );
|
glMatrixMode( GL_PROJECTION );
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
if (frameBuffer.drawBuffer != GL_DRAW_FRAMEBUFFER) {
|
if (frameBuffer.drawBuffer != GL_FRAMEBUFFER) {
|
||||||
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
|
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
|
||||||
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
|
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
|
||||||
} else {
|
} else {
|
||||||
|
@ -912,7 +912,7 @@ void OGL_DrawTexturedRect( float ulx, float uly, float lrx, float lry, float uls
|
||||||
glDisable( GL_CULL_FACE );
|
glDisable( GL_CULL_FACE );
|
||||||
glMatrixMode( GL_PROJECTION );
|
glMatrixMode( GL_PROJECTION );
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
if (frameBuffer.drawBuffer != GL_DRAW_FRAMEBUFFER) {
|
if (frameBuffer.drawBuffer != GL_FRAMEBUFFER) {
|
||||||
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
|
glOrtho( 0, VI.width, VI.height, 0, 1.0f, -1.0f );
|
||||||
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
|
glViewport( 0, (frameBuffer.drawBuffer == GL_BACK ? OGL.heightOffset : 0), OGL.width, OGL.height );
|
||||||
} else {
|
} else {
|
||||||
|
|
2
gDP.cpp
2
gDP.cpp
|
@ -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)
|
if (g_bDepthClearOnly && color != DEPTH_CLEAR_COLOR)
|
||||||
return;
|
return;
|
||||||
if (frameBuffer.drawBuffer == GL_DRAW_FRAMEBUFFER) {
|
if (frameBuffer.drawBuffer == GL_FRAMEBUFFER) {
|
||||||
frameBuffer.top->cleared = true;
|
frameBuffer.top->cleared = true;
|
||||||
frameBuffer.top->fillcolor = color;
|
frameBuffer.top->fillcolor = color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user