Beispiel #1
0
void
ejoy2d_game_drawframe(struct game *G) {
	lua_pushvalue(G->L, DRAWFRAME_FUNCTION);
	call(G->L, 0, 0);
	lua_settop(G->L, TOP_FUNCTION);
	shader_flush();
	label_flush();
}
Beispiel #2
0
void
ejoy2d_game_drawframe(struct game *G) {
	reset_drawcall_count();
	lua_pushvalue(G->L, DRAWFRAME_FUNCTION);
	call(G->L, 0, 0);
	lua_settop(G->L, TOP_FUNCTION);
	shader_flush();
	label_flush();
	//int cnt = drawcall_count();
	//printf("-> %d\n", cnt);
}
Beispiel #3
0
void
scissor_pop() {
    assert(S.depth > 0);
    shader_flush();
    --S.depth;
    if (S.depth == 0) {
        glDisable(GL_SCISSOR_TEST);
        return;
    }
    struct box * s = &S.s[S.depth];
    screen_scissor(s->x,s->y,s->width,s->height);
}
Beispiel #4
0
void
scissor_push(int x, int y, int w, int h) {
    assert(S.depth < SCISSOR_MAX);
    shader_flush();
    if (S.depth == 0) {
        glEnable(GL_SCISSOR_TEST);
    }
    struct box * s = &S.s[S.depth++];
    s->x = x;
    s->y = y;
    s->width = w;
    s->height = h;
    screen_scissor(s->x,s->y,s->width,s->height);
}
Beispiel #5
0
int pixel_flush(lua_State *L) {
	(void)L;
	shader_flush();
	label_flush();
	return 0;
}
Beispiel #6
0
static int
lendframe(lua_State *L) {
	shader_flush();
	label_flush();
	return 0;
}