whb/gfx: Add some functions to access colour / depth / context.

This commit is contained in:
James Benton 2019-11-23 11:39:43 +00:00
parent e9f8b191e5
commit ac17c9a885
2 changed files with 55 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include <wut.h>
#include <gx2/context.h>
#include <gx2/shaders.h>
#include <gx2/texture.h>
@ -91,6 +92,24 @@ WHBGfxLoadGFDTexture(uint32_t index,
BOOL
WHBGfxFreeTexture(GX2Texture *texture);
GX2ColorBuffer *
WHBGfxGetTvColourBuffer();
GX2DepthBuffer *
WHBGfxGetTVDepthBuffer();
GX2ContextState *
WHBGfxGetTVContextState();
GX2ColorBuffer *
WHBGfxGetDRCColourBuffer();
GX2DepthBuffer *
WHBGfxGetDRCDepthBuffer();
GX2ContextState *
WHBGfxGetDRCContextState();
#ifdef __cplusplus
}
#endif

View File

@ -531,3 +531,39 @@ WHBGfxFinishRenderTV()
{
GX2CopyColorBufferToScanBuffer(&sTvColourBuffer, GX2_SCAN_TARGET_TV);
}
GX2ColorBuffer *
WHBGfxGetTvColourBuffer()
{
return &sTvColourBuffer;
}
GX2DepthBuffer *
WHBGfxGetTVDepthBuffer()
{
return &sTvDepthBuffer;
}
GX2ContextState *
WHBGfxGetTVContextState()
{
return sTvContextState;
}
GX2ColorBuffer *
WHBGfxGetDRCColourBuffer()
{
return &sDrcColourBuffer;
}
GX2DepthBuffer *
WHBGfxGetDRCDepthBuffer()
{
return &sDrcDepthBuffer;
}
GX2ContextState *
WHBGfxGetDRCContextState()
{
return sDrcContextState;
}