浏览代码

* More coding style fixes in the GL driver.

tags/v0.99.beta14
Sam Hocevar sam 19 年前
父节点
当前提交
e9b2ea68cb
共有 1 个文件被更改,包括 26 次插入28 次删除
  1. +26
    -28
      caca/driver_gl.c

+ 26
- 28
caca/driver_gl.c 查看文件

@@ -65,7 +65,7 @@ struct driver_private
float font_width, font_height; float font_width, font_height;
float incx, incy; float incx, incy;
int id[(128 - 32)]; int id[(128 - 32)];
int id_uni[8]; /* Hack, fixme*/ int id_uni[8]; /* Hack, FIXME */
unsigned char close; unsigned char close;
unsigned char bit; unsigned char bit;
unsigned char mouse_changed, mouse_clicked; unsigned char mouse_changed, mouse_clicked;
@@ -213,49 +213,47 @@ static int gl_init_graphics(caca_display_t *dp)
glColor3f(1, 1, 1); glColor3f(1, 1, 1);
glTranslatef(0.5,0.5,0); glTranslatef(0.5,0.5,0);


if(i==0) /* 0x00002580*/ switch(i)
{ {
case 0: /* 0x00002580 */
glBegin(GL_QUADS); glBegin(GL_QUADS);
glVertex2f(0,0); glVertex2f(9,0); glVertex2f(9,7); glVertex2f(0,7); glVertex2f(0,0); glVertex2f(9,0); glVertex2f(9,7); glVertex2f(0,7);
glEnd(); glEnd();
} break;
else if(i==1) /* 0x00002584*/ case 1: /* 0x00002584 */
{
glBegin(GL_QUADS); glBegin(GL_QUADS);
glVertex2f(0,7); glVertex2f(9,7); glVertex2f(9,15); glVertex2f(0,15); glVertex2f(0,7); glVertex2f(9,7); glVertex2f(9,15); glVertex2f(0,15);
glEnd(); glEnd();
} break;
else if(i==2) /* 0x00002588*/ case 2: /* 0x00002588 */
{
glBegin(GL_QUADS); glBegin(GL_QUADS);
glVertex2f(0,0); glVertex2f(9,0); glVertex2f(9,15); glVertex2f(0,15); glVertex2f(0,0); glVertex2f(9,0); glVertex2f(9,15); glVertex2f(0,15);
glEnd(); glEnd();
} break;
else if(i==3) /* 0x0000258c*/ case 3: /* 0x0000258c */
{
glBegin(GL_QUADS); glBegin(GL_QUADS);
glVertex2f(0,0); glVertex2f(4,0); glVertex2f(4,15); glVertex2f(0,15); glVertex2f(0,0); glVertex2f(4,0); glVertex2f(4,15); glVertex2f(0,15);
glEnd(); glEnd();
} break;
else if(i==4) /* 0x00002590*/ case 4: /* 0x00002590 */
{
glBegin(GL_QUADS); glBegin(GL_QUADS);
glVertex2f(4,0); glVertex2f(9,0); glVertex2f(9,15); glVertex2f(4,15); glVertex2f(4,0); glVertex2f(9,0); glVertex2f(9,15); glVertex2f(4,15);
glEnd(); glEnd();
} break;
else if(i>=5) /* 0x00002591*/ default: /* 0x0000259[123] */
{ {
int a, j, k = i-5; int a, j, k = i - 5;
for(j = dp->drv.p->font_height; j--; ) for(j = dp->drv.p->font_height; j--; )
for(a = dp->drv.p->font_width; a--; ) for(a = dp->drv.p->font_width; a--; )
{ {
if(((a + 2 * (j & 1)) & 3) > k) if(((a + 2 * (j & 1)) & 3) > k)
continue; continue;

glBegin(GL_POINTS);
glBegin(GL_POINTS); glVertex2f(a, j);
glVertex2f(a, j); glEnd();
glEnd(); }
} }
} }


glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);


||||||
x
 
000:0
正在加载...
取消
保存