fxengine/include/fxengine/face.h

49 lines
1.1 KiB
C
Raw Normal View History

2019-09-07 21:56:35 +02:00
#ifndef FE_TRIANGLE
#define FE_TRIANGLE
2019-09-01 10:13:17 +02:00
2019-09-07 21:23:46 +02:00
#include <fxengine/point.h>
2019-09-07 21:56:35 +02:00
#include <fxengine/texture.h>
2019-09-01 10:13:17 +02:00
#include <stdbool.h>
/**
* @brief Triangle struct used to render fonctions
2019-09-07 21:56:35 +02:00
* @param[out] part choose the used texture half // currently not implemented
2019-09-01 10:13:17 +02:00
* @param[out] clockwised choose the visible side of the face
* @param[out] s1,s2,s3 three points
* @param[out] texture used texture
*/
2019-09-07 21:56:35 +02:00
struct fe_triangle
2019-09-01 10:13:17 +02:00
{
2019-09-07 21:56:35 +02:00
fe_integer_position * s1;
fe_integer_position * s2;
fe_integer_position * s3;
2019-09-01 10:13:17 +02:00
2019-09-07 21:56:35 +02:00
fe_texture_rich * texture;
2019-09-01 10:13:17 +02:00
bool part;
bool clockwised;
};
2019-09-07 21:56:35 +02:00
typedef struct fe_triangle fe_triangle;
2019-09-01 10:13:17 +02:00
2019-09-07 21:23:46 +02:00
2019-09-01 10:13:17 +02:00
/**
* @brief Renders a triangle with perspective deformation
*
* @param[in] face pointer to the face to draw
*/
2019-09-07 21:56:35 +02:00
void fe_display_triangle(const fe_triangle * face);
2019-09-01 10:13:17 +02:00
/**
* @brief Clears vram, zbuffer
*
* @param[in] libprof_channel The libprof channel to be used to count_fps
2019-09-07 21:56:35 +02:00
* if you don't use libprof channel, (default), you send what you want,
* it doesn't matters ;)
2019-09-01 10:13:17 +02:00
*/
2019-09-07 21:23:46 +02:00
void fe_render_update(const uint32_t libprof_channel);
2019-09-01 10:13:17 +02:00
#endif