mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-12 02:41:14 +00:00
always clear before drawing 2d image
This commit is contained in:
parent
8158bca0ab
commit
e135bf5595
@ -1424,6 +1424,7 @@ void GXMRenderer::StartScene()
|
||||
sceGxmSetCullMode(gxm->context, SCE_GXM_CULL_CCW);
|
||||
gxm->sceneStarted = true;
|
||||
this->quadsUsed = 0;
|
||||
this->cleared = false;
|
||||
|
||||
sceGxmNotificationWait(&this->vertexNotifications[this->currentVertexBufferIndex]);
|
||||
sceGxmNotificationWait(&this->fragmentNotifications[this->currentFragmentBufferIndex]);
|
||||
@ -1554,6 +1555,7 @@ void GXMRenderer::Clear(float r, float g, float b)
|
||||
{
|
||||
this->StartScene();
|
||||
gxm->clear(r, g, b, false);
|
||||
this->cleared = true;
|
||||
}
|
||||
|
||||
void GXMRenderer::Flip()
|
||||
@ -1579,6 +1581,10 @@ void GXMRenderer::Flip()
|
||||
void GXMRenderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color)
|
||||
{
|
||||
this->StartScene();
|
||||
if(!this->cleared) {
|
||||
gxm->clear(0,0,0, false);
|
||||
this->cleared = true;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
char marker[256];
|
||||
|
||||
@ -161,6 +161,7 @@ class GXMRenderer : public Direct3DRMRenderer {
|
||||
Vertex2D* quadVertices[GXM_VERTEX_BUFFER_COUNT];
|
||||
uint16_t* quadIndices;
|
||||
int quadsUsed = 0;
|
||||
bool cleared = false;
|
||||
|
||||
SceGxmNotification vertexNotifications[GXM_VERTEX_BUFFER_COUNT];
|
||||
SceGxmNotification fragmentNotifications[GXM_FRAGMENT_BUFFER_COUNT];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user