commit
9854477f0b
|
@ -165,7 +165,6 @@ int main(void)
|
||||||
|
|
||||||
/* Draw */
|
/* Draw */
|
||||||
win.setActive(true);
|
win.setActive(true);
|
||||||
nk_color_fv(bg, background);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
glClearColor(bg.r, bg.g, bg.b, bg.a);
|
glClearColor(bg.r, bg.g, bg.b, bg.a);
|
||||||
/* IMPORTANT: `nk_sfml_render` modifies some global OpenGL state
|
/* IMPORTANT: `nk_sfml_render` modifies some global OpenGL state
|
||||||
|
|
|
@ -97,9 +97,9 @@ nk_sfml_render(enum nk_anti_aliasing AA)
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
{
|
{
|
||||||
GLsizei vs = sizeof(struct nk_sfml_vertex);
|
GLsizei vs = sizeof(struct nk_sfml_vertex);
|
||||||
size_t vp = offsetof(struct nk_sfml_vertex, position);
|
size_t vp = NK_OFFSETOF(struct nk_sfml_vertex, position);
|
||||||
size_t vt = offsetof(struct nk_sfml_vertex, uv);
|
size_t vt = NK_OFFSETOF(struct nk_sfml_vertex, uv);
|
||||||
size_t vc = offsetof(struct nk_sfml_vertex, col);
|
size_t vc = NK_OFFSETOF(struct nk_sfml_vertex, col);
|
||||||
|
|
||||||
/* convert from command queue into draw list and draw to screen */
|
/* convert from command queue into draw list and draw to screen */
|
||||||
const struct nk_draw_command* cmd;
|
const struct nk_draw_command* cmd;
|
||||||
|
|
|
@ -171,9 +171,7 @@ int main(void)
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
/* Draw */
|
/* Draw */
|
||||||
float bg[4];
|
|
||||||
win.setActive(true);
|
win.setActive(true);
|
||||||
nk_color_fv(bg, background);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
glClearColor(bg.r, bg.g, bg.b, bg.a);
|
glClearColor(bg.r, bg.g, bg.b, bg.a);
|
||||||
/* IMPORTANT: `nk_sfml_render` modifies some global OpenGL state
|
/* IMPORTANT: `nk_sfml_render` modifies some global OpenGL state
|
||||||
|
|
|
@ -134,9 +134,9 @@ nk_sfml_device_create(void)
|
||||||
{
|
{
|
||||||
/* buffer setup */
|
/* buffer setup */
|
||||||
GLsizei vs = sizeof(struct nk_sfml_vertex);
|
GLsizei vs = sizeof(struct nk_sfml_vertex);
|
||||||
size_t vp = offsetof(struct nk_sfml_vertex, position);
|
size_t vp = NK_OFFSETOF(struct nk_sfml_vertex, position);
|
||||||
size_t vt = offsetof(struct nk_sfml_vertex, uv);
|
size_t vt = NK_OFFSETOF(struct nk_sfml_vertex, uv);
|
||||||
size_t vc = offsetof(struct nk_sfml_vertex, col);
|
size_t vc = NK_OFFSETOF(struct nk_sfml_vertex, col);
|
||||||
|
|
||||||
glGenBuffers(1, &dev->vbo);
|
glGenBuffers(1, &dev->vbo);
|
||||||
glGenBuffers(1, &dev->ebo);
|
glGenBuffers(1, &dev->ebo);
|
||||||
|
|
Loading…
Reference in New Issue