Skip to content
Snippets Groups Projects
Commit 6389003d authored by DarkGod's avatar DarkGod
Browse files

small chagnes to c core

parent 22f6061c
No related branches found
No related tags found
No related merge requests found
......@@ -209,8 +209,12 @@ static int map_object_texture(lua_State *L)
static int map_object_shader(lua_State *L)
{
map_object *obj = (map_object*)auxiliar_checkclass(L, "core{mapobj}", 1);
shader_type *s = (shader_type*)auxiliar_checkclass(L, "gl{program}", 2);
obj->shader = s;
if (!lua_isnil(L, 2)) {
shader_type *s = (shader_type*)auxiliar_checkclass(L, "gl{program}", 2);
obj->shader = s;
} else {
obj->shader = NULL;
}
return 0;
}
......
......@@ -244,7 +244,6 @@ static void particles_draw(particles_type *ps, float x, float y, float zoom)
if (ps->shader) glUseProgramObjectARB(0);
glRotatef(-ps->rotate, 0, 0, 1);
glPopMatrix();
glTranslatef(-x, -y, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment