Basic 2D rendering primitives.
More...
Basic 2D rendering primitives.
◆ fsClear()
Clears the window.
Clears the window and the OpenGL context using the specified color.
- Parameters
-
◆ FsColor_new()
| FsColor FsColor_new |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b ) |
Creates a color.
- Parameters
-
| r | Red component (0-255). |
| g | Green component (0-255). |
| b | Blue component (0-255). |
- Returns
- Resulting color.
◆ fsDrawCircle()
| void fsDrawCircle |
( |
const FsCircle * | circle | ) |
|
Draws a circle.
Draws a colored circle.
- Parameters
-
◆ fsDrawLine()
| void fsDrawLine |
( |
const FsLine * | line | ) |
|
Draws a line.
Draws a colored line using the provided line parameters.
- Parameters
-
◆ fsDrawPixel()
| void fsDrawPixel |
( |
const FsPoint * | p | ) |
|
Draws a pixel.
Draws a colored point at the specified position.
- Parameters
-
◆ fsDrawQuad()
| void fsDrawQuad |
( |
const FsQuad * | quad | ) |
|
Draws a quadrilateral.
Draws a colored quadrilateral.
- Parameters
-
| quad | Quadrilateral to draw. |
◆ fsDrawSprite()
| void fsDrawSprite |
( |
const FsSprite * | sprite | ) |
|
Draws a 2D sprite.
Renders a sprite on the window using its position, size, rotation angle, and texture. The sprite is drawn as a textured quad with OpenGL.
- Parameters
-
- Note
- The sprite's texture must be loaded and valid.
-
Uses OpenGL immediate mode for rendering.
◆ fsDrawTriangle()
Draws a triangle.
Draws a colored triangle.
- Parameters
-
◆ fsOrthoSet()
| void fsOrthoSet |
( |
int | width, |
|
|
int | height ) |
Sets the orthographic projection.
Defines the orthographic rendering view for the current window.
- Parameters
-
| width | Width of the orthographic view. |
| height | Height of the orthographic view. |