50 lines
1.0 KiB
C
50 lines
1.0 KiB
C
#ifndef FE_TRIANGLE
|
|
#define FE_TRIANGLE
|
|
|
|
#include <fxengine/space.h>
|
|
#include <fxengine/texture.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
* @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 fe_triangle
|
|
{
|
|
fe_ipoint * s1;
|
|
fe_ipoint * s2;
|
|
fe_ipoint * s3;
|
|
|
|
fe_texture_rich * texture;
|
|
|
|
bool part;
|
|
bool clockwised;
|
|
};
|
|
typedef struct fe_triangle fe_triangle;
|
|
|
|
|
|
|
|
/**
|
|
* @brief Renders a triangle with perspective deformation
|
|
*
|
|
* @param[in] face pointer to the face to draw
|
|
*/
|
|
void fe_display_triangle(const fe_triangle * face);
|
|
|
|
/**
|
|
* @brief Clears vram, zbuffer
|
|
*
|
|
* @param[in] libprof_channel The libprof channel to be used to count_fps
|
|
* if you don't use libprof channel, (default), you send what you want,
|
|
* it doesn't matters ;)
|
|
*/
|
|
void fe_render_update(const uint32_t libprof_channel);
|
|
|
|
|
|
|
|
#endif
|