-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIGfx.h
35 lines (27 loc) · 867 Bytes
/
IGfx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include <enginedefs.h>
#include <stdint.h>
typedef struct IGfx {
void (*begin)(int window);
void (*end)(int window);
void (*begin3D)(Camera cam);
void (*end3D)(void);
void (*clear)(unsigned color);
void (*getWindowSize)(int* w,int* h);
void (*setColor)(unsigned color);
void (*drawRect)(float x, float y, float w,float h,float strength);
void (*fillRect)(float x, float y, float w,float h);
void (*drawLine)(float x1, float y1, float x2, float y2);
UID (*loadImg)(const char* filepath);
void (*drawImg)(UID id,KRect src, KRect dst,float angle,KFlip flip);
void (*getImgSize)(UID id,int* w,int* h);
UID (*loadMesh)(const char* filepath);
void (*drawMesh)(UID id);
} IGfx;
#ifdef __cplusplus
extern "C"{
#endif
void create_graphics_provider(void* engine);
#ifdef __cplusplus
}
#endif