OldSchool Library
|
Topics | |
Images | |
Low level drawing | |
Functions | |
void | oslSwizzleTexture (u8 *out, const u8 *in, unsigned int width, unsigned int height) |
Swizzles texture data. | |
void | oslUnswizzleTexture (u8 *out, const u8 *in, unsigned int width, unsigned int height) |
Unswizzles texture data. | |
void | oslDrawTile (int u, int v, int x, int y, int tX, int tY) |
Draws a tile from the currently selected texture at the specified position. | |
Advanced drawing tasks.
|
extern |
Swizzles texture data.
This function performs a swizzling operation on texture data. Swizzling is a process that reorders texture data to improve memory access patterns, often used for better performance on specific hardware. The function takes an input texture and writes the swizzled output to the provided buffer. @param out Pointer to the buffer where the swizzled texture data will be stored. @param in Pointer to the input texture data. @param width The width of the texture in pixels. @param height The height of the texture in pixels.
|
extern |
Unswizzles texture data.
This function performs the inverse of the swizzling operation. It converts texture data that has been swizzled back into its original order. The function takes a swizzled texture and writes the unswizzled output to the provided buffer. @param out Pointer to the buffer where the unswizzled texture data will be stored. @param in Pointer to the swizzled texture data. @param width The width of the texture in pixels. @param height The height of the texture in pixels.
|
extern |
Draws a tile from the currently selected texture at the specified position.
This function draws a rectangular section (tile) from the currently bound texture to a specified position on the screen. The tile is defined by its top-left corner (u
, v
) and its size (tX
, tY
). The destination position on the screen is specified by (x
, y
).
u | The x-coordinate of the top-left corner of the tile in the texture. |
v | The y-coordinate of the top-left corner of the tile in the texture. |
x | The x-coordinate of the position on the screen where the tile will be drawn. |
y | The y-coordinate of the position on the screen where the tile will be drawn. |
tX | The width of the tile. |
tY | The height of the tile. |