GoldFish Engine
Quite simple and lightweight game engine
|
Graphic interface. More...
#include <gf_pre.h>
#include <gf_macro.h>
#include <gf_type/graphic.h>
#include <gf_type/draw.h>
#include <gf_type/texture.h>
Go to the source code of this file.
Macros | |
#define | GF_GRAPHIC_2D 2 |
Dimension parameter for 2D. | |
#define | GF_GRAPHIC_3D 3 |
Dimension parameter for 3D. | |
#define | GF_SET_COLOR(color, red, green, blue, alpha) |
Macro to set color safely and shorter. | |
Functions | |
void | gf_graphic_clear (gf_draw_t *draw) |
Clear the screen. | |
void | gf_graphic_begin_2d (gf_draw_t *draw) |
Start 2D mode. | |
void | gf_graphic_end_2d (gf_draw_t *draw) |
End 2D mode. | |
void | gf_graphic_draw_texture_polygon (gf_draw_t *draw, gf_texture_t *texture, gf_graphic_color_t color, int dim, int npair,...) |
Draw polygon with texture. | |
void | gf_graphic_fill_polygon (gf_draw_t *draw, gf_graphic_color_t color, int dim, int npair,...) |
Draw polygon. | |
void | gf_graphic_perspective (gf_draw_t *draw, double fovy, double znear, double zfar) |
Set perspective. | |
void | gf_graphic_set_camera (gf_draw_t *draw) |
Set camera. | |
double | gf_graphic_text_width (gf_draw_t *draw, double size, const char *text) |
Calculate text width. | |
void | gf_graphic_text (gf_draw_t *draw, double x, double y, double size, const char *text, gf_graphic_color_t color) |
Draw text. | |
void | gf_graphic_fill_rect (gf_draw_t *draw, double x, double y, double w, double h, gf_graphic_color_t color) |
Draw filled rectangle. | |
void | gf_graphic_draw_texture_2d (gf_draw_t *draw, double x, double y, double w, double h, gf_texture_t *texture, gf_graphic_color_t color) |
Draw rectangle with texture. | |
Graphic interface.
Definition in file gf_graphic.h.
#define GF_GRAPHIC_2D 2 |
Dimension parameter for 2D.
Definition at line 26 of file gf_graphic.h.
#define GF_GRAPHIC_3D 3 |
Dimension parameter for 3D.
Definition at line 32 of file gf_graphic.h.
#define GF_SET_COLOR | ( | color, | |
red, | |||
green, | |||
blue, | |||
alpha | |||
) |
Macro to set color safely and shorter.
color | gf_graphic_color_t |
Definition at line 39 of file gf_graphic.h.
|
extern |
Start 2D mode.
Definition at line 22 of file gf_graphic.c.
|
extern |
Clear the screen.
Definition at line 26 of file gf_graphic.c.
|
extern |
Draw rectangle with texture.
Definition at line 57 of file gf_graphic_common.c.
|
extern |
Draw polygon with texture.
Definition at line 28 of file gf_graphic.c.
|
extern |
End 2D mode.
Definition at line 24 of file gf_graphic.c.
|
extern |
Draw polygon.
Definition at line 30 of file gf_graphic.c.
|
extern |
Draw filled rectangle.
Definition at line 19 of file gf_graphic_common.c.
|
extern |
Set perspective.
draw | Drawing interface |
fovy | FOV |
znear | Distance from viewer to the near clipping plane |
zfar | Distance from viewer to the far clipping plane |
Definition at line 32 of file gf_graphic.c.
|
extern |
|
extern |
Draw text.
Definition at line 21 of file gf_graphic_common.c.
|
extern |