(RGL PS3) Cleanups
This commit is contained in:
parent
acc8600b0a
commit
4405d08ae4
|
@ -3408,8 +3408,7 @@ GLAPI void APIENTRY glDeleteFramebuffersOES( GLsizei n, const GLuint *framebuffe
|
||||||
|
|
||||||
GLAPI void APIENTRY glGenFramebuffersOES( GLsizei n, GLuint *framebuffers )
|
GLAPI void APIENTRY glGenFramebuffersOES( GLsizei n, GLuint *framebuffers )
|
||||||
{
|
{
|
||||||
RGLcontext *LContext = _CurrentContext;
|
rglTexNameSpaceGenNames( &_CurrentContext->framebufferNameSpace, n, framebuffers );
|
||||||
rglTexNameSpaceGenNames( &LContext->framebufferNameSpace, n, framebuffers );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GLAPI GLenum APIENTRY glCheckFramebufferStatusOES( GLenum target )
|
GLAPI GLenum APIENTRY glCheckFramebufferStatusOES( GLenum target )
|
||||||
|
@ -3417,11 +3416,7 @@ GLAPI GLenum APIENTRY glCheckFramebufferStatusOES( GLenum target )
|
||||||
RGLcontext* LContext = _CurrentContext;
|
RGLcontext* LContext = _CurrentContext;
|
||||||
|
|
||||||
if (LContext->framebuffer)
|
if (LContext->framebuffer)
|
||||||
{
|
return rglPlatformFramebufferCheckStatus( rglGetFramebuffer( LContext, LContext->framebuffer ) );
|
||||||
rglFramebuffer* framebuffer = rglGetFramebuffer( LContext, LContext->framebuffer );
|
|
||||||
|
|
||||||
return rglPlatformFramebufferCheckStatus( framebuffer );
|
|
||||||
}
|
|
||||||
|
|
||||||
return GL_FRAMEBUFFER_COMPLETE_OES;
|
return GL_FRAMEBUFFER_COMPLETE_OES;
|
||||||
}
|
}
|
||||||
|
@ -3941,7 +3936,6 @@ static rglTexture *rglAllocateTexture(void)
|
||||||
texture->compareMode = GL_NONE;
|
texture->compareMode = GL_NONE;
|
||||||
texture->compareFunc = GL_LEQUAL;
|
texture->compareFunc = GL_LEQUAL;
|
||||||
texture->gammaRemap = 0;
|
texture->gammaRemap = 0;
|
||||||
texture->vertexEnable = GL_FALSE;
|
|
||||||
texture->usage = 0;
|
texture->usage = 0;
|
||||||
texture->isRenderTarget = GL_FALSE;
|
texture->isRenderTarget = GL_FALSE;
|
||||||
texture->image = NULL;
|
texture->image = NULL;
|
||||||
|
@ -4249,8 +4243,8 @@ rglTexture *rglGetCurrentTexture (const void *data, GLenum target)
|
||||||
rglTexture *defaultTexture = unit->default2D;
|
rglTexture *defaultTexture = unit->default2D;
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
return ( rglTexture * )LContext->textureNameSpace.data[name];
|
defaultTexture = (rglTexture *)LContext->textureNameSpace.data[name];
|
||||||
else
|
|
||||||
return defaultTexture;
|
return defaultTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4359,13 +4353,6 @@ GLAPI void APIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param )
|
||||||
case GL_TEXTURE_WRAP_R:
|
case GL_TEXTURE_WRAP_R:
|
||||||
texture->wrapR = param;
|
texture->wrapR = param;
|
||||||
break;
|
break;
|
||||||
case GL_TEXTURE_FROM_VERTEX_PROGRAM_SCE:
|
|
||||||
if ( param != 0 )
|
|
||||||
texture->vertexEnable = GL_TRUE;
|
|
||||||
else
|
|
||||||
texture->vertexEnable = GL_FALSE;
|
|
||||||
texture->revalidate |= RGL_TEXTURE_REVALIDATE_LAYOUT;
|
|
||||||
break;
|
|
||||||
case GL_TEXTURE_COMPARE_MODE_ARB:
|
case GL_TEXTURE_COMPARE_MODE_ARB:
|
||||||
texture->compareMode = param;
|
texture->compareMode = param;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2657,11 +2657,7 @@ GLAPI void APIENTRY glTextureReferenceSCE( GLenum target, GLuint levels,
|
||||||
newLayout.pixelBits = rglPlatformGetBitsPerPixel( newLayout.internalFormat );
|
newLayout.pixelBits = rglPlatformGetBitsPerPixel( newLayout.internalFormat );
|
||||||
newLayout.pitch = pitch ? pitch : GET_TEXTURE_PITCH(texture);
|
newLayout.pitch = pitch ? pitch : GET_TEXTURE_PITCH(texture);
|
||||||
|
|
||||||
GLboolean isRenderTarget = GL_FALSE;
|
texture->isRenderTarget = GL_FALSE;
|
||||||
GLboolean vertexEnable = GL_FALSE;
|
|
||||||
|
|
||||||
texture->isRenderTarget = isRenderTarget;
|
|
||||||
texture->vertexEnable = vertexEnable;
|
|
||||||
|
|
||||||
if ( gcmTexture->gpuAddressId != GMM_ERROR )
|
if ( gcmTexture->gpuAddressId != GMM_ERROR )
|
||||||
rglPlatformDestroyTexture( texture );
|
rglPlatformDestroyTexture( texture );
|
||||||
|
|
Loading…
Reference in New Issue