citro3d
|
Process render target framebuffer. More...
#include "texture.h"
Go to the source code of this file.
Data Structures | |
struct | C3D_FrameBuf |
Enumerations | |
enum | C3D_ClearBits { C3D_CLEAR_COLOR = BIT(0) , C3D_CLEAR_DEPTH = BIT(1) , C3D_CLEAR_ALL = C3D_CLEAR_COLOR | C3D_CLEAR_DEPTH } |
Flags for C3D_FrameBufClear. More... | |
Functions | |
u32 | C3D_CalcColorBufSize (u32 width, u32 height, GPU_COLORBUF fmt) |
Calculates the size of a color buffer. More... | |
u32 | C3D_CalcDepthBufSize (u32 width, u32 height, GPU_DEPTHBUF fmt) |
Calculates the size of a depth buffer. More... | |
C3D_FrameBuf * | C3D_GetFrameBuf (void) |
Returns global citro3d framebuffer structure. More... | |
void | C3D_SetFrameBuf (C3D_FrameBuf *fb) |
Sets global citro3d framebuffer structure. More... | |
void | C3D_FrameBufTex (C3D_FrameBuf *fb, C3D_Tex *tex, GPU_TEXFACE face, int level) |
Binds a texture to a framebuffer. This texture will be used as the color buffer. More... | |
void | C3D_FrameBufClear (C3D_FrameBuf *fb, C3D_ClearBits clearBits, u32 clearColor, u32 clearDepth) |
Sets the clear bits and color for a framebuffer. More... | |
void | C3D_FrameBufTransfer (C3D_FrameBuf *fb, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags) |
Transfers a framebuffer to the LCD display. More... | |
static void | C3D_FrameBufAttrib (C3D_FrameBuf *fb, u16 width, u16 height, bool block32) |
Sets framebuffer attributes. More... | |
static void | C3D_FrameBufColor (C3D_FrameBuf *fb, void *buf, GPU_COLORBUF fmt) |
Assigns a color buffer to a framebuffer. More... | |
static void | C3D_FrameBufDepth (C3D_FrameBuf *fb, void *buf, GPU_DEPTHBUF fmt) |
Assigns a depth buffer to a framebuffer. More... | |
Process render target framebuffer.
enum C3D_ClearBits |
u32 C3D_CalcColorBufSize | ( | u32 | width, |
u32 | height, | ||
GPU_COLORBUF | fmt | ||
) |
Calculates the size of a color buffer.
[in] | width | Width of the color buffer in pixels. |
[in] | height | Height of the color buffer in pixels. |
[in] | fmt | Format of the color buffer. |
u32 C3D_CalcDepthBufSize | ( | u32 | width, |
u32 | height, | ||
GPU_DEPTHBUF | fmt | ||
) |
Calculates the size of a depth buffer.
[in] | width | Width of the depth buffer in pixels. |
[in] | height | Height of the depth buffer in pixels. |
[in] | fmt | Format of the depth buffer. |
|
inlinestatic |
Sets framebuffer attributes.
[in] | fb | Pointer to a C3D_FrameBuf struct. |
[in] | width | Width of framebuffer in pixels. |
[in] | height | Height of framebuffer in pixels. |
[in] | block32 | Specifies if using 32x32 tile format. |
void C3D_FrameBufClear | ( | C3D_FrameBuf * | fb, |
C3D_ClearBits | clearBits, | ||
u32 | clearColor, | ||
u32 | clearDepth | ||
) |
Sets the clear bits and color for a framebuffer.
[in] | fb | Pointer to a C3D_FrameBuf struct. |
[in] | clearBits | Specifies which buffers to clear. (see C3D_ClearBits) |
[in] | clearColor | 32 bit RGBA value to clear the color buffer with. |
[in] | clearDepth | Value to clear the depth buffer with. |
|
inlinestatic |
Assigns a color buffer to a framebuffer.
[in] | fb | Pointer to a C3D_FrameBuf struct. |
[in] | buf | Pointer to the buffer to use. |
[in] | fmt | Format of the color buffer. |
|
inlinestatic |
Assigns a depth buffer to a framebuffer.
[in] | fb | Pointer to a C3D_FrameBuf struct. |
[in] | buf | Pointer to the buffer to use. |
[in] | fmt | Format of the depth buffer. |
void C3D_FrameBufTex | ( | C3D_FrameBuf * | fb, |
C3D_Tex * | tex, | ||
GPU_TEXFACE | face, | ||
int | level | ||
) |
Binds a texture to a framebuffer. This texture will be used as the color buffer.
[out] | fb | Pointer to C3D_FrameBuf struct. |
[in] | tex | Pointer to C3D_Tex struct. |
[in] | face | Specifies face of cubemap to be used (ignored if it is a 2D texture) |
[in] | level | Specifies mipmap level. 0 is the original image, 1 is the first mipmap, and so on. |
void C3D_FrameBufTransfer | ( | C3D_FrameBuf * | fb, |
gfxScreen_t | screen, | ||
gfx3dSide_t | side, | ||
u32 | transferFlags | ||
) |
Transfers a framebuffer to the LCD display.
[in] | fb | Pointer to a C3D_FrameBuf struct. |
[in] | screen | Screen to transfer the framebuffer to. |
[in] | side | Side of the screen to transfer the framebuffer to (unused for the bottom screen) |
[in] | transferFlags | Specifies GX_TRANSFER bitflags. |
C3D_FrameBuf* C3D_GetFrameBuf | ( | void | ) |
Returns global citro3d framebuffer structure.
void C3D_SetFrameBuf | ( | C3D_FrameBuf * | fb | ) |
Sets global citro3d framebuffer structure.
[in] | fb | Pointer to C3D_FrameBuf struct. |