Mario Kart 64
Loading...
Searching...
No Matches
framebuffer_effects.h File Reference
#include <libultraship.h>
Include dependency graph for framebuffer_effects.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void FB_CreateFramebuffers (void)
 
void FB_CopyToFramebuffer (Gfx **gfxP, s32 fb_src, s32 fb_dest, u8 oncePerFrame, u8 *hasCopied)
 
void FB_WriteFramebufferSliceToCPU (Gfx **gfxP, void *buffer, u8 byteSwap)
 
void FB_DrawFromFramebuffer (Gfx **gfxP, s32 fb, u8 alpha)
 
void FB_DrawFromFramebufferScaled (Gfx **gfxP, s32 fb, u8 alpha, float scaleX, float scaleY)
 

Variables

s32 gReusableFrameBuffer
 
s32 gN64ResFrameBuffer
 

Function Documentation

◆ FB_CopyToFramebuffer()

void FB_CopyToFramebuffer ( Gfx ** gfxP,
s32 fb_src,
s32 fb_dest,
u8 oncePerFrame,
u8 * hasCopied )

Copies the current texture data from the source frame buffer to the destination frame buffer Setting oncePerFrame ensures that the copy will only happen once every game frame. This is important for effects that could be affected by increased frame interpolation (like motion blur). A pointer to a boolean is passed to the render for the render to set once the copy has been performed. This function uses opcodes from f3dex2 but may be called when s2dex is loaded, such as during shrink window. Make sure f3dex2 is loaded before this function is called.

Here is the caller graph for this function:

◆ FB_CreateFramebuffers()

void FB_CreateFramebuffers ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FB_DrawFromFramebuffer()

void FB_DrawFromFramebuffer ( Gfx ** gfxP,
s32 fb,
u8 alpha )

Draws the texture data from the specified frame buffer as a full screen image

Here is the call graph for this function:

◆ FB_DrawFromFramebufferScaled()

void FB_DrawFromFramebufferScaled ( Gfx ** gfxP,
s32 fb,
u8 alpha,
float scaleX,
float scaleY )

Similar to FB_DrawFromFramebuffer, but scales the image relative to the center of the screen. This function uses opcodes from f3dex2 but may be called when s2dex is loaded, such as during shrink window. Make sure f3dex2 is loaded before this function is called.

Here is the call graph for this function:

◆ FB_WriteFramebufferSliceToCPU()

void FB_WriteFramebufferSliceToCPU ( Gfx ** gfxP,
void * buffer,
u8 byteSwap )

Copies a 4:3 slice of the current framebuffer scaled down to 320x240 to a CPU buffer address. The buffer output will be in RGBA16 format. Specify the byteswap flag to force the buffer data to be written as BigEndian, which is required if the buffer is being used as a texture in F3D.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gN64ResFrameBuffer

s32 gN64ResFrameBuffer
extern

◆ gReusableFrameBuffer

s32 gReusableFrameBuffer
extern