Exemplo n.º 1
0
static void LineStrip(void)
{
	glBegin(GL_LINE_STRIP);
	   AUX_SETCOLOR(windType,AUX_RED);
	   glVertex2f(PIXEL_CENTER(-boxW/4),PIXEL_CENTER(-boxH/4));
	   AUX_SETCOLOR(windType,AUX_GREEN);
	   glVertex2f(PIXEL_CENTER(-boxW/4),PIXEL_CENTER(boxH/4));
	   AUX_SETCOLOR(windType,AUX_BLUE);
	   glVertex2f(PIXEL_CENTER(boxW/4),PIXEL_CENTER(boxH/4));
	   AUX_SETCOLOR(windType,AUX_WHITE);
	   glVertex2f(PIXEL_CENTER(boxW/4),PIXEL_CENTER(-boxH/4));
	glEnd();

	glBegin(GL_LINE_STRIP);
	   glVertex2i(0,0);
	glEnd();
}
Exemplo n.º 2
0
static void LineStrip(void)
{

    glBegin(GL_LINE_STRIP);
	SetColor(COLOR_RED);
	glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
	SetColor(COLOR_GREEN);
	glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
	SetColor(COLOR_BLUE);
	glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
	SetColor(COLOR_WHITE);
	glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
    glEnd();

    glBegin(GL_LINE_STRIP);
	glVertex2i(0, 0);
    glEnd();
}
Exemplo n.º 3
0
static void LineLoop(void)
{

    glBegin(GL_LINE_LOOP);
	SetColor(COLOR_RED);
	glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
	SetColor(COLOR_GREEN);
	glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
	SetColor(COLOR_BLUE);
	glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
	SetColor(COLOR_WHITE);
	glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
    glEnd();

    glEnable(GL_LOGIC_OP);
    glLogicOp(GL_XOR);

    glEnable(GL_BLEND);
    glBlendFunc(GL_ONE, GL_ONE);

    SetColor(COLOR_MAGENTA);
    glBegin(GL_LINE_LOOP);
	glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8));
	glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8));
    glEnd();
    glBegin(GL_LINE_LOOP);
	glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8+5));
	glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8+5));
    glEnd();
    glDisable(GL_LOGIC_OP);
    glDisable(GL_BLEND);

    SetColor(COLOR_GREEN);
    glBegin(GL_POINTS);
	glVertex2i(0, 0);
    glEnd();

    glBegin(GL_LINE_LOOP);
	glVertex2i(0, 0);
    glEnd();
}