diff --git a/panda/src/tinydisplay/clip.c b/panda/src/tinydisplay/clip.c index 7ab5bdfa45..6fddae1a22 100644 --- a/panda/src/tinydisplay/clip.c +++ b/panda/src/tinydisplay/clip.c @@ -235,7 +235,6 @@ void gl_draw_triangle(GLContext *c, if (norm == 0) return; front = norm < 0.0; - front = front ^ c->current_front_face; /* back face culling */ if (c->cull_face_enabled) { diff --git a/panda/src/tinydisplay/init.c b/panda/src/tinydisplay/init.c index 5e9ef673f4..c8647dbe8d 100644 --- a/panda/src/tinydisplay/init.c +++ b/panda/src/tinydisplay/init.c @@ -39,35 +39,19 @@ void glInit(GLContext *c, ZBuffer *zbuffer) c->current_color.Y=1.0; c->current_color.Z=1.0; c->current_color.W=1.0; - c->longcurrent_color[0] = 65535; - c->longcurrent_color[1] = 65535; - c->longcurrent_color[2] = 65535; c->current_normal.X=1.0; c->current_normal.Y=0.0; c->current_normal.Z=0.0; c->current_normal.W=0.0; - c->current_edge_flag=1; - c->current_tex_coord.X=0; c->current_tex_coord.Y=0; c->current_tex_coord.Z=0; c->current_tex_coord.W=1; - c->current_front_face=0; /* 0 = GL_CCW 1 = GL_CW */ c->cull_face_enabled=0; - /* clear */ - c->clear_color.v[0]=0; - c->clear_color.v[1]=0; - c->clear_color.v[2]=0; - c->clear_color.v[3]=0; - c->clear_depth=0; - - /* opengl 1.1 polygon offset */ - c->offset_states = 0; - /* specular buffer */ c->specbuf_first = NULL; c->specbuf_used_counter = 0; diff --git a/panda/src/tinydisplay/zgl.h b/panda/src/tinydisplay/zgl.h index f9f1a9c576..04c9bbf713 100644 --- a/panda/src/tinydisplay/zgl.h +++ b/panda/src/tinydisplay/zgl.h @@ -171,7 +171,6 @@ typedef struct GLContext { GLViewport viewport; /* current state */ - int current_front_face; int smooth_shade_model; int cull_face_enabled; int cull_clockwise; @@ -179,21 +178,10 @@ typedef struct GLContext { gl_draw_triangle_func draw_triangle_front,draw_triangle_back; ZB_fillTriangleFunc zb_fill_tri; - /* clear */ - float clear_depth; - V4 clear_color; - /* current vertex state */ V4 current_color; - unsigned int longcurrent_color[3]; /* precomputed integer color */ V4 current_normal; V4 current_tex_coord; - int current_edge_flag; - - /* opengl 1.1 polygon offset */ - float offset_factor; - float offset_units; - int offset_states; /* depth test */ int depth_test;