fxengine/include/fxengine/render/triangle.h

52 lines
1.3 KiB
C

#ifndef RENDER_TRIANGLE_H
#define RENDER_TRIANGLE_H
#include <fxengine/render/translate.h>
#include <fxengine/render/bitmap.h>
#include <stdbool.h>
/**
* @brief Regulates the maximum fps count to 30 fps
*/
#define MINIMUM_FRAME_DELAY 3333
/**
* @brief Triangle struct used to render fonctions
* @param[out] part choose the used texture half
* @param[out] clockwised choose the visible side of the face
* @param[out] s1,s2,s3 three points
* @param[out] texture used texture
*/
struct render_triangle
{
render_integer_position * s1;
render_integer_position * s2;
render_integer_position * s3;
bitmap_rich * texture;
bool part;
bool clockwised;
};
typedef struct render_triangle render_triangle;
/**
* @brief Renders a triangle with perspective deformation
*
* @param[in] face pointer to the face to draw
*/
void render_display_triangle(const render_triangle * face);
/**
* @brief Clears vram, zbuffer
*
* @param[in] libprof_channel The libprof channel to be used to count_fps
* @param[in] dh Horizontal direction (rad)
* @param[in] dv Vertical direction (rad)
* @param[in] roulis The roulis (rad)
* @param[in] camera Pointer to the camera
*/
void render_update(const uint32_t libprof_channel);
#endif