コード例 #1
0
void GLDraw::drawPiano()
{
    int i;
    int octaves = 10;
    glPushMatrix();
    glTranslatef(-9.0f, 0.0f, -10.0f);
    for( int j = 0 ; j < octaves; j++ )
    {
        int sc = j*12;
        glColor3f(1.0f, 1.0f, 1.0f);
        drawWhite(j, keys[sc]);
        drawWhite(j, keys[sc+2]);
        drawWhite(j, keys[sc+4]);
        drawWhite(j, keys[sc+5]);
        drawWhite(j, keys[sc+7]);
        drawWhite(j, keys[sc+9]);
        drawWhite(j, keys[sc+11]);

        glTranslatef(-1.75f, 0.0f, 0.0f);
        glColor3f(0.0f, 0.0f, 0.0f);
        drawBlack(j, keys[sc+1]);
        drawBlack(j, keys[sc+3]);
        glTranslatef(0.25f, 0.0f, 0.0f);
        drawBlack(j, keys[sc+6]);
        drawBlack(j, keys[sc+8]);
        drawBlack(j, keys[sc+10]);
        glTranslatef(0.25f, 0.0f, 0.0f);
    }
    glPopMatrix();

}
コード例 #2
0
ファイル: only_color.c プロジェクト: ghl800/mt_on_sdl
void drawBlackscreen()
{
    SDL_Widget* black_label = drawBlack();


    SDL_WidgetClose(black_label);
    refreshWin();
}
コード例 #3
0
ファイル: testApp.cpp プロジェクト: naus3a/danseNeurale
//--------------------------------------------------------------
void testApp::draw()
{
	performer = user.getTrackedUsers();
	
	if(bCalib){
		vout.begin();
		ofSetHexColor(0x000000);
		ofRect(0, 0, vout.fbo.getWidth(), vout.fbo.getHeight());
		ofSetHexColor(0xffffff);
		glPushMatrix();
		glScalef(skHratio, skVratio, 1);
		glTranslatef(skelHoffset, skelVoffset, 0);
		depth.draw(0, 0, 640, 480);
		//performer = user.getTrackedUsers();
		if(performer.size()>0){
			if(performer[0]!=NULL){
				glPushAttrib(GL_ALL_ATTRIB_BITS);
				performer[0]->debugDraw();
				glPopAttrib();
			}
		}
		glPopMatrix();
		vout.end();
	}else{
		switch (scene) {
			case 0:
				drawWhite();
				break;
			case 1:
				drawSynch();
				break;
			case 2:
				drawGrow();
				break;
			case 3:
				drawWings();
				break;
			case 4:
				drawWings();
				break;
			case 8:
				drawDpt();
				break;
			case 9:
				drawBlack();
				break;

		}
	}
	wing.drawBuffers();
	glPushMatrix();
	glTranslatef(10, 250, 0);
	glScalef(.5, .5, 1);
	depth.draw(0, 0);
	if(performer.size()>0){
		if(performer[0]!=NULL){
			glPushAttrib(GL_ALL_ATTRIB_BITS);
			performer[0]->debugDraw();
			glPopAttrib();
		}
	}
	glPopMatrix();
}