mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-13 22:41:48 +01:00
WHBGfx - Separate ClearColor() and allow custom colors.
This commit is contained in:
parent
da8975303c
commit
203dc66527
@ -37,6 +37,9 @@ WHBGfxBeginRender();
|
|||||||
void
|
void
|
||||||
WHBGfxFinishRender();
|
WHBGfxFinishRender();
|
||||||
|
|
||||||
|
void
|
||||||
|
WHBGfxClearColor(float r, float g, float b, float a);
|
||||||
|
|
||||||
void
|
void
|
||||||
WHBGfxBeginRenderDRC();
|
WHBGfxBeginRenderDRC();
|
||||||
|
|
||||||
|
@ -64,6 +64,9 @@ sTvContextState = NULL;
|
|||||||
static GX2ContextState *
|
static GX2ContextState *
|
||||||
sDrcContextState = NULL;
|
sDrcContextState = NULL;
|
||||||
|
|
||||||
|
static BOOL
|
||||||
|
sDrawingTv = FALSE;
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
sGpuTimedOut = FALSE;
|
sGpuTimedOut = FALSE;
|
||||||
|
|
||||||
@ -489,13 +492,25 @@ WHBGfxFinishRender()
|
|||||||
GX2SetDRCEnable(TRUE);
|
GX2SetDRCEnable(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
WHBGfxClearColor(float r, float g, float b, float a)
|
||||||
|
{
|
||||||
|
if (sDrawingTv) {
|
||||||
|
GX2ClearColor(&sTvColourBuffer, r, g, b, a);
|
||||||
|
GX2ClearDepthStencilEx(&sTvDepthBuffer, sTvDepthBuffer.depthClear, sTvDepthBuffer.stencilClear, GX2_CLEAR_FLAGS_DEPTH | GX2_CLEAR_FLAGS_STENCIL);
|
||||||
|
GX2SetContextState(sTvContextState);
|
||||||
|
} else {
|
||||||
|
GX2ClearColor(&sDrcColourBuffer, r, g, b, a);
|
||||||
|
GX2ClearDepthStencilEx(&sDrcDepthBuffer, sDrcDepthBuffer.depthClear, sDrcDepthBuffer.stencilClear, GX2_CLEAR_FLAGS_DEPTH | GX2_CLEAR_FLAGS_STENCIL);
|
||||||
|
GX2SetContextState(sDrcContextState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WHBGfxBeginRenderDRC()
|
WHBGfxBeginRenderDRC()
|
||||||
{
|
{
|
||||||
GX2SetContextState(sDrcContextState);
|
GX2SetContextState(sDrcContextState);
|
||||||
GX2ClearColor(&sDrcColourBuffer, 0.0f, 1.0f, 0.0f, 1.0f);
|
sDrawingTv = FALSE;
|
||||||
GX2ClearDepthStencilEx(&sDrcDepthBuffer, sDrcDepthBuffer.depthClear, sDrcDepthBuffer.stencilClear, GX2_CLEAR_FLAGS_DEPTH | GX2_CLEAR_FLAGS_STENCIL);
|
|
||||||
GX2SetContextState(sDrcContextState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -508,9 +523,7 @@ void
|
|||||||
WHBGfxBeginRenderTV()
|
WHBGfxBeginRenderTV()
|
||||||
{
|
{
|
||||||
GX2SetContextState(sTvContextState);
|
GX2SetContextState(sTvContextState);
|
||||||
GX2ClearColor(&sTvColourBuffer, 1.0f, 0.0f, 0.0f, 1.0f);
|
sDrawingTv = TRUE;
|
||||||
GX2ClearDepthStencilEx(&sTvDepthBuffer, sTvDepthBuffer.depthClear, sTvDepthBuffer.stencilClear, GX2_CLEAR_FLAGS_DEPTH | GX2_CLEAR_FLAGS_STENCIL);
|
|
||||||
GX2SetContextState(sTvContextState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user