maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
Retro3D Textures and Sprites

Functions for drawing textured polygons and billboarded sprites. More...

Collaboration diagram for Retro3D Textures and Sprites:

Macros

#define RETRO3D_TEX_FLAG_GENERATE   0x01
 Flag for retro3d_texture_platform_refresh() indicating the platform should generate a new texture, rather than updating the existing.
 
#define RETRO3D_TEX_FLAG_DESTROY   0x02
 Flag for retro3d_texture_platform_refresh() indicating the platform should destroy a texture, rather than updating the existing.
 
#define RETRO3D_TEX_FLAG_DEACTIVATE   0x04
 Flag for retro3d_texture_activate() indicating the platform should deactivate the current texture, rather than activating a new one.
 

Functions

MERROR_RETVAL retro3d_draw_window (retroflat_blit_t *win, retroflat_pxxy_t x, retroflat_pxxy_t y)
 Draw a bitmap 2D "window" in ortho view proportionally on screen. (e.g. for displaying a UI.)
 
MERROR_RETVAL retro3d_texture_activate (retroflat_blit_t *tex, uint8_t flags)
 Activates the given texture so the next polygon will be drawn with it.
 
MERROR_RETVAL retro3d_texture_platform_refresh (retroflat_blit_t *tex, uint8_t flags)
 Perform engine-specific refresh actions on the texture.
 

Detailed Description

Functions for drawing textured polygons and billboarded sprites.

Function Documentation

◆ retro3d_texture_activate()

MERROR_RETVAL retro3d_texture_activate ( retroflat_blit_t * tex,
uint8_t flags )

Activates the given texture so the next polygon will be drawn with it.

Parameters
flagsOptionally accepts RETRO3D_TEX_FLAG_DEACTIVATE.

◆ retro3d_texture_platform_refresh()

MERROR_RETVAL retro3d_texture_platform_refresh ( retroflat_blit_t * tex,
uint8_t flags )

Perform engine-specific refresh actions on the texture.

Parameters
flagsOptionally accepts RETRO3D_TEX_FLAG_GENERATE or RETRO3D_TEX_FLAG_DESTROY.
Warning
This should be called by the low-level Retro3D API and shouldn't need to be called directly by programs using this library!