Example #1
0
GLuint principalAxisGenList(GLuint axisList)
{
	V4d specular = {1.0f,1.0f,1.0f,1.0f};
	V4d FirstDiffuse = {1.0f,1.0f,1.0f,1.0f};
	V4d FirstAmbiant = {1.0f,1.0f,1.0f,1.0f};
	V4d secondDiffuse = {1.0f,1.0f,1.0f,1.0f};
	V4d secondAmbiant = {1.0f,1.0f,1.0f,1.0f};
	V4d thirdDiffuse = {1.0f,1.0f,1.0f,1.0f};
	V4d thirdAmbiant = {1.0f,1.0f,1.0f,1.0f};
	V3d firstVector = {1.0f,1.0f,1.0f};
	V3d secondVector = {1.0f,1.0f,1.0f};
	V3d thirdVector = {1.0f,1.0f,1.0f};
	GLdouble radius = axis.radius;
	gint i;

	if (glIsList(axisList) == GL_TRUE) glDeleteLists(axisList,1);

	compute_the_principal_axis();

	if(!axis.def) return 0;

	for(i=0;i<3;i++)
	{
		FirstDiffuse[i] = axis.firstColor[i];
		secondDiffuse[i] = axis.secondColor[i];
		thirdDiffuse[i] = axis.thirdColor[i];

		FirstAmbiant[i] = FirstDiffuse[i]/10;
		secondAmbiant[i] = secondDiffuse[i]/10;
		thirdAmbiant[i] = thirdDiffuse[i]/10;
	}
	FirstDiffuse[3] = 1;
	FirstAmbiant[3] = 1;

	secondDiffuse[3] = 1;
	secondAmbiant[3] = 1;

	thirdDiffuse[3] = 1;
	thirdAmbiant[3] = 1;

	for(i=0;i<3;i++)
	{
		firstVector[i]   =  axis.firstVector[i]*axis.scal;
		secondVector[i]   =  axis.secondVector[i]*axis.scal;
		thirdVector[i] =  axis.thirdVector[i]*axis.scal;
	}
	

	

    axisList = glGenLists(1);
	glNewList(axisList, GL_COMPILE);
	drawAxis(firstVector, radius, axis.origin,  specular, FirstDiffuse, FirstAmbiant);
	drawAxis(secondVector, radius, axis.origin,  specular, secondDiffuse, secondAmbiant);
	drawAxis(thirdVector, radius, axis.origin,  specular, thirdDiffuse, thirdAmbiant);
	glEndList();
	return axisList;
}
int main()
{
    int gdriver = DETECT, gmode;
    initgraph(&gdriver, &gmode, "");
    setbkcolor(WHITE);

    Point p[4] =
    {
        Point{0,0},
        Point{100,0},
        Point{100,100},
        Point{0,100}
    };
    int ch;
    cleardevice();
    drawAxis(BLACK);
    for(int i = 0; i<4; i++)
    {
        Line l = {p[i], p[(i+1)%4]};
        l.plotLineDDA(RED);
    }
    while((ch = getKeyCode())!=ESC)
    {
        switch(ch)
        {
        case 'A' :
            for(int i = 0; i<4; i++)
            {
                rotateSingle(&p[i], toRadian(10));
            }
            break;
        case 'W' :
            for(int i = 0; i<4; i++)
            {
                translateSingle(&p[i], 10,10);
            }
            break;
        case 'D' :
            for(int i = 0; i<4; i++)
            {
                scaleSingle(&p[i], 1.5, 1.5);
            }
            break;
        }
        cleardevice();
        drawAxis(BLACK);
        for(int i = 0; i<4; i++)
        {
            Line l = {p[i], p[(i+1)%4]};
            l.plotLineDDA(RED);
        }
    }
    return 0;
}
Example #3
0
//--------------------------------------------------------------
void graph::draw(){
	ofSetColor(255, 255, 255);
	ofRect(graphX, graphY, graphW, graphH);
	
	for ( int b=0; b<NUM_BEATS; b++ ) {
		for ( int s=0; s<NUM_STEPS; s++ ) {
			
			int num = (b * NUM_STEPS) + s;
			
			// Draw Graph
			int xDrawPoint = ((b * NUM_STEPS) + s) * (graphColPad + graphColW);
			float val = sequencer->getSParam()->getStepValue(b, s) * graphH;
			if (b == selectedBeat and s == selectedStep) {
				// step selected
				ofSetColor(204, 102, 0);
			} else if (b == sequencer->getBeat() and s == sequencer->getStep()) {
				// step playing
				ofSetColor(255, 255, 255);
			} else if (num >= highlightStart and num < highlightEnd) {
				// step selected
				ofSetColor(0, 204, 0);
			} else {
				ofSetColor(0, 102, 204);
			} 
			ofRect(1 + xDrawPoint, graphH - val, graphColW, val);
			
			// Draw Axis
			string marker;
			if (s == 0) {
				marker = ofToString(b + 1);
				drawAxis(marker, 15, xDrawPoint, graphH);
			} else if (s == 8) {
				marker = ofToString(b + 1) + ".2";
				drawAxis(marker, 5, xDrawPoint, graphH);
			} else if (s == 16) {
				marker = ofToString(b + 1) + ".3";
				drawAxis(marker, 5, xDrawPoint, graphH);
			} else if (s == 24) {
				marker = ofToString(b + 1) + ".4";
				drawAxis(marker, 5, xDrawPoint, graphH);
			}
			
			
			// Draw highlightStart and highlightEnd
			if (num == highlightStart || num == highlightEnd) {
				ofSetColor(204, 102, 0);
				ofRect(xDrawPoint, graphY, 1, graphH + 20);
			}
			
		}
	}
	
}
Example #4
0
void drawWorldModelAbsolute(Canvas& canvas, const WorldModel2D& wm, const geo::Vec2& p0)
{
    drawWorld(canvas, wm);

    for(unsigned int i = 1; i < wm.entities.size(); ++i)
    {
        const Entity2D& e = wm.entities[i];
        drawArrow(canvas, p0, e.pose.t, Color(150, 150, 150, 2));
        drawAxis(canvas, e.pose);
    }

    drawAxis(canvas, fromXYA(p0.x, p0.y, 0));
}
Example #5
0
  void LinePlot::drawPlot(Frame* frame)
  {
    Frame innerFrame = getPlotArea(frame);

    // Obtain mins and maxes from the data
    double minXdata, maxXdata, minYdata, maxYdata;
    sl.findMinMax(minXdata,maxXdata,minYdata,maxYdata);

    // Assume these will be used as boundaries of the plots
    double minX=minXdata, maxX=maxXdata, minY=minYdata, maxY=maxYdata;
    
    // See if the user overrode the axes limits
    if (fixedXaxis)
    {
      minX = minx;
      maxX = minx + width;
    }

    if (fixedYaxis)
    {
       minY = miny;
       maxY = miny+height;
    }

    // Use default min/max
    sl.drawInFrame(innerFrame,minX,maxX,minY,maxY);

    setXAxis(minX, maxX);
    setYAxis(minY, maxY); 

    drawAxis(frame);
  }
Example #6
0
void OpenGLTransformation::drawSub1()
{
  glViewport(0, 0, windowWidth / 2, windowHeight);
  glScissor(0, 0, windowWidth / 2, windowHeight);

  glClearColor(0.1f, 0.1f, 0.1f, 1);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);

  MatStack.matrixMode(tgt::MatrixStack::PROJECTION);
  MatStack.pushMatrix();
  MatStack.loadMatrix(camera->getProjectionMatrix(glm::ivec2(windowWidth * 0.5f, windowHeight)));
  MatStack.matrixMode(tgt::MatrixStack::MODELVIEW);
  MatStack.pushMatrix();
  MatStack.loadMatrix(camera->getViewMatrix());

  // always draw the grid at the origin (before any modeling transform)
  drawGrid(10, 1);
  drawAxis(4);

  glm::mat4 cubeModel = glm::translate(glm::vec3(-0.5f));
  MatStack.pushMatrix();
  MatStack.loadMatrix(camera->getViewMatrix() * cubeModel);
  drawCube();
  MatStack.popMatrix();

  MatStack.matrixMode(tgt::MatrixStack::PROJECTION);
  MatStack.popMatrix();
  MatStack.matrixMode(tgt::MatrixStack::MODELVIEW);
  MatStack.popMatrix();
}
Example #7
0
/*!
 * \brief where points are draw and point of view set.
 */
void FrameGL::paintGL()
{
    glPushMatrix();
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glLoadIdentity();

    // Se seleeciona el punto de vista desde donde se mira.
    //float ptoVista[3]={-50.f,-100.f,-1000.f};

    // Define una transformacion de vision.Punto de vista XYZ, centro de la
    // escena donde se mira XYZ y vector de direccion ascendente
    //gluLookAt(ptoVista[0],ptoVista[1],ptoVista[2],0.0,0.0,5000.0,0.0,-1.0,0.0);
    gluLookAt(-7*anglex, -7*angley-1000,-3000.0,    0.0,-1000.0,3000.0,   0.0,-1.0,0.0);

    glScalef(zoom, zoom, 1);

    //glRotatef(m_x,1.0f, 0.0f, 0.0f); // Rotacion X (ángulo, vector alrededor del que giras)
    //glRotatef(m_y,0.0f, 1.0f, 0.0f); // Rotacion Y

    drawAxis();
    drawCloud();
    //drawLines();//el de Raul Alves

    glPopMatrix();
}
Example #8
0
void GLWidget::paintGL(){
    // Lights
    bulb.pos = freeCam.pos;
    bulb.pos.u = 1.0;

    // Camera
    freeCam.ar = aspectRatio;
    if( !getQuaternion())
        freeCam.eye = freeCam.pos + Vector3f( sin(camP)*cos(camT), sin(camT), cos(camP)*cos(camT));
    setActiveCamera( freeCam);
    if( getQuaternion())
        setActiveViewTrackBall( m_trackBalls);

    stoma.isHidden = !drawWithTexture;
    render3dObjects();
    if( drawGraph)
        stoma.drawGraph();
    if( isAxisDrawn)
    {
        glPushMatrix();
        glTranslatef(80.0,130.0,0.0);
        drawAxis();
        glPopMatrix();
    }

    swapBuffers();
}
/*
Enter n for polygon
5
Enter points of polygon in clockwise/anticlockwise order\n
-20 50
50 200
120 50
50 -200
-20 50
Enter rectangle
0 -100 100 150
*/
int main()
{
    int gdriver = DETECT, gmode;
    initgraph(&gdriver, &gmode, "");
    setbkcolor(WHITE);
    cleardevice();
    drawAxis(BLACK);

    int n;
    Poly *head = NULL;
    printf("Enter n for polygon");
    scanf("%d", &n);
    printf("Enter points of polygon in clockwise/anticlockwise order\n");
    for(int i = 0; i<n; i++)
    {
        Point p;
        scanf("%lf%lf",&p.x,&p.y);
        Poly *x = (Poly *) malloc (sizeof(Poly));
        *x = {p, head};
        head = x;
    }
    head->plotPoly(MAGENTA,0);
    Rect r;
    printf("Enter rectangle\n");
    scanf("%lf%lf%lf%lf",&r.min.x, &r.min.y, &r.max.x, &r.max.y);
    r.plotRect(BLUE);
    Poly *op = sutherlandHodgeman(head, &r);
    op->plotPoly(YELLOW,0);
    getch();
	return 0;
}
Example #10
0
void GLWidget::paintGL() {

  std::cout << "paintGL()" << std::endl;
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  //================================
  // OpenGLの座標系を動かして描画
  //================================

  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();

  //初期状態では画面右がx,上がy,手前がz
  // z軸を上,x軸を手前にする
  glRotated(-90, 1, 0, 0);
  glRotated(-90, 0, 0, 1);

  glTranslatef(-5, 0.0, 0.0);

  // 描画設定
  glEnable(GL_BLEND);
  glEnable(GL_DEPTH_TEST);

  //軸の描写
  glPushMatrix();
  glLineWidth(2);
  drawAxis();
  glPopMatrix();

  glDisable(GL_BLEND);
  glDisable(GL_COLOR_MATERIAL);

  //全ての処理を実行
  glFlush();
}
/*
-30 70
60 100
80 -10
20 -20
-80 0
-30 70
Enter line
-150 100
150 20

-30 70
60 100
80 -10
20 -20
-80 0
-30 70
Enter line
*/
int main()
{
	int gdriver = DETECT, gmode;
    initgraph(&gdriver, &gmode, "");
    setbkcolor(WHITE);
    cleardevice();
    drawAxis(BLACK);
    int n;
    Poly *poly = NULL;
    printf("Enter n for convex polygon\n");
    scanf("%d", &n);
    printf("Enter points in clockwise/anticlockwise order\n");
    for(int i = 0; i<n; i++)
    {
        int x,y;
        scanf("%d%d",&x,&y);
        Point p = Point{x,y};
        Poly *newPoly = (Poly *)malloc(sizeof(Poly));
        *newPoly = Poly{p, poly};
        poly = newPoly;
    }
    poly->plotPoly(BLACK, 0);
    printf("Enter line\n");
    Line l;
    scanf("%lf%lf%lf%lf", &l.p1.x, &l.p1.y, &l.p2.x, &l.p2.y);
    l.plotLineDDA(BLUE);
    cyrusBeck(poly, &l, YELLOW);
    getch();
    closegraph();
    return 0;

}
Example #12
0
void display(void)
{
	int i,k;
	glColor3f(1.0,1.0,1.0) ;
	glClear(GL_COLOR_BUFFER_BIT);

	drawAxis () ;


	glColor3f( 1,0,0);

	for(i=0;i<n;i++)
	{
		y[i] = 0 ;

		for(k=1;k<=i;k++)
		{
			y[i] += - a[k]*y[i-k] ;
		}

		for(k=0;k<=i;k++)
		{
			y[i] += b[k]*U(i-k) ;
		}
	}

	for(i=0;i<n;i++)
		drawPixel(i*10,y[i]*1.0);

	glFlush();
}
Example #13
0
void DrawAxis::openWebcam()
{
	webcam.open(0);

	webcam.set(CV_CAP_PROP_FRAME_WIDTH, frameWidth);
	webcam.set(CV_CAP_PROP_FRAME_HEIGHT, frameHeight);
	rvec = Mat(Size(3, 1), CV_64F);
	tvec = Mat(Size(3, 1), CV_64F);
	cout << "intrinsinc = " << intrinsic_params << endl;
	cout << "dist = " << distortion_params << endl;
	cout << "intrinsic.size = " << intrinsic_params.size() << endl;
	while (true){
		webcam.read(webcamImage);
		bool findCorners = findChessboardCorners(webcamImage, boardSize, corners, CALIB_CB_FAST_CHECK);
		if (findCorners){
			solvePnP(Mat(boardPoints), Mat(corners), intrinsic_params, distortion_params, rvec, tvec, false);
			projectPoints(cubePoints, rvec, tvec, intrinsic_params, distortion_params, cubeFramePoints);
			projectPoints(framePoints, rvec, tvec, intrinsic_params, distortion_params, imageFramePoints);

			drawAxis(webcamImage, color, 3);
			drawCube(webcamImage, cubeFramePoints, Scalar(255, 0, 255), 2);

		}
		namedWindow("OpenCV Webcam", 0);
		imshow("OpenCV Webcam", webcamImage);

		waitKey(10);
	}
}
int main(void)
{
    int gdriver = DETECT, gmode;
    initgraph(&gdriver, &gmode, "");
    setbkcolor(WHITE);
    cleardevice();
    drawAxis(BLACK);
    setcolor(BLACK);
    int x1, y1, x2, y2;
    printf("Enter line1(midpoint)\n");
    scanf("%d%d%d%d",&x1,&y1,&x2, &y2);
    Line l1 = Line{Point{x1, y1}, Point{x2,y2}};
    outtextxy(x1+XREF,-y1+YREF,"midpoint algorithm");

    printf("Enter line2(dda)");
    scanf("%d%d%d%d",&x1,&y1,&x2, &y2);
    Line l2 = Line{Point{x1, y1}, Point{x2,y2}};
    outtextxy(x1+XREF,-y1+YREF,"dda algorithm");

    printf("Enter line2(bressenham)");
    scanf("%d%d%d%d",&x1,&y1,&x2, &y2);
    Line l3 = Line{Point{x1, y1}, Point{x2,y2}};
    outtextxy(x1+XREF,-y1+YREF,"bressenham algorithm");

    l1.plotLineMidPt(BLACK);
    l2.plotLineDDA(BLACK);
    l3.plotLineBressen(BLACK);
    getch();
    closegraph();
    return 0;

}
Example #15
0
void myDisplay(void)
{
    glClear(GL_COLOR_BUFFER_BIT);
    drawAxis();
    drawSin();
    glFlush();
}
int main()
{
    int gdriver = DETECT, gmode;
    initgraph(&gdriver, &gmode, "");

    setbkcolor(WHITE);
    cleardevice();
    drawAxis(BLACK);
    setcolor(BLACK);

    Point p;
    int a,b;

    printf("Enter center and a,b(midpoint first order)\n");
    scanf("%lf%lf%d%d",&p.x,&p.y,&a,&b);
    Hyperbola h1 = {a,b,p};
    outtextxy(p.x+XREF, -p.y+YREF+b, "midpoint first order");
    h1.plotFirstOrder(BLACK, 40);

    printf("Enter center and a,b(midpoint second order)\n");
    scanf("%lf%lf%d%d",&p.x,&p.y,&a,&b);
    Hyperbola h2 = {a,b,p};
    outtextxy(p.x-a+XREF, -p.y+YREF+b, "midpoint second order");
    h2.plotSecondOrder(BLACK, 40);

    getch();
    closegraph();
    return 0;
}
Example #17
0
void 
drawElement(e2dElement* elem)  {
    glPushMatrix();
    
    multMatrix(&elem->localTransform);
    switch(elem->type)
    {
            
        case(E2D_GROUP):
            drawGroup((e2dGroup*)elem);
            break;
           
        case(E2D_PATH):
            drawPath((e2dPath*)elem);
            break;
            
        case(E2D_IMAGE):
            drawImage((e2dImage*)elem);
            break;
          
        case(E2D_CLONE):
            drawClone((e2dClone*)elem);
            break;
            
        default:
            break;
    }
        
    drawAxis();
    drawRect(elem->bboxPosition, elem->bboxWidth, elem->bboxHeight);
    glPopMatrix();
}
Example #18
0
void display() {

	glClearColor(0.3, 0.5, 0.1, 1.0);
	glClear(GL_COLOR_BUFFER_BIT);

	// Projection Trans.
	glMatrixMode(GL_PROJECTION);

		glLoadIdentity();

		// Projection Matrix.
		gluPerspective(30, 1, 1, 30);

	// ModelView Trans.
	glMatrixMode(GL_MODELVIEW);

		glLoadIdentity();

		// Viewing Trans.
		viewingTransformation();

		// Modeling Trans.
		drawAxis(1.0);
		drawIronman();
	
	//glutPostRedisplay();
	glutSwapBuffers();
}
Example #19
0
//display function
void display(void)
{
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(45, 1, 1, 100);

    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();

    gluLookAt(camPos[0], camPos[1], camPos[2], 0,0,0, 0,1,0);
    glRotatef(angleY,1,0,0);
    glRotatef(angleX,0,1,0);

    drawAxis(50);
    //draw the sceneGraph
    glEnable(GL_LIGHTING);
    setMaterial(m1);
    drawXZPlane(0,50);

    glColor3f(0.5,0.5,0.5);
    SG->draw();
    drawText();

    glutSwapBuffers();
}
/**
 * Exposes the camera with gluLookAt function
 */
void Camera::expose() {
    
    Vector target = position + forward;
    gluLookAt(CO(position), CO(target), CO(up));
    
    drawAxis();
}
Example #21
0
void myDisplay(void)
{
        glClear(GL_COLOR_BUFFER_BIT);
        drawAxis();
        drawCircle();
        glFlush();
        glutSwapBuffers();
}
Example #22
0
void
drawClone(e2dClone* clone) {
    glPushMatrix();
    glTranslatef((clone->position).x, (clone->position).y, 0);
    drawElement(clone->pointsToElement);
    glPopMatrix();
    drawAxis();
    drawRect(clone->element.bboxPosition, clone->element.bboxWidth, clone->element.bboxHeight);
}
Example #23
0
void 
drawGroup(e2dGroup* group)  {
    e2dGroupIterator iter = e2dGroupGetChildIterator(group);
    while(e2dGroupIteratorHasNext(&iter))  {
        drawElement(e2dGroupIteratorNext(&iter));
    }
    drawAxis();
    drawRect(group->element.bboxPosition, group->element.bboxWidth, group->element.bboxHeight);
}
void OpenInfraPlatform::UserInterface::Alignment2DScene::drawDiagram(QPainterPath& diagPainter, QPainterPath& diagDashedPainter)
{
	QString text;

	int width = 80;

	drawAxis(diagPainter, bounds[3] * scalingY, bounds[0], bounds[1], scalingX, 120);

	drawAxis(diagPainter, bounds[0] * scalingX, bounds[2], bounds[3], scalingY, 80, false, true);

	// Ratio
	text = QString::number(ratio.x()) + " : " + QString::number(ratio.y());
	auto ratioLabel = addText(text, diagramFont);
	ratioLabel->setPos(bounds[0] * scalingX, bounds[2] * scalingY - 20);
	ratioLabel->setDefaultTextColor(diagramFontColor);

	v_drawDiagram(diagPainter, diagDashedPainter);
}
Example #25
0
void drawWorldModelSceneGraph(Canvas& canvas, const WorldModel2D& wm, const std::vector<Link>& links)
{
    drawWorld(canvas, wm);

    for(unsigned int i = 0; i < links.size(); ++i)
    {
        const Link& link = links[i];

        const Entity2D& e1 = wm.entities[link.i1];
        const Entity2D& e2 = wm.entities[link.i2];

        drawArrow(canvas, e1.pose.t, e2.pose.t, Color(150, 150, 150, 2));

        drawAxis(canvas, e1.pose);
        drawAxis(canvas, e2.pose);
    }

//    drawAxis(canvas, fromXYA(p0.x, p0.y, 0));
}
Example #26
0
 void GlWidget::paintGL()
  {
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      glLoadIdentity();
      gluLookAt(eyeX, eyeY, eyeZ, -xMove, -yMove, 0.0, upX, upY, upZ);
      for(int i=0; i<this->objects.size(); i++){
          this->objects.at(i)->draw(0.01,this->layers, show_travel, this->currentLayer);
      }
      drawAxis();
      drawGrid();
  }
Example #27
0
  void SurfacePlot::drawPlot(Frame* frame)
  {
    Frame innerFrame = getPlotArea(frame);

    // Draw Bitmap
    Bitmap b(innerFrame.lx(),innerFrame.ly(),innerFrame.ux(),innerFrame.uy(),icm);
    b.oversample(osr,osc);
    b.useBoxes(boxes);
    innerFrame << b;

    drawAxis(frame);
  }
Example #28
0
void View::paintGL()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    m_camera->loadModelViewMatrix();
    drawScene();

    if( m_visualHints & VH_ShowAxis )
        drawAxis();

    if( m_visualHints & VH_ShowPlane )
        drawPlane();
}
Example #29
0
void Renderer::drawAll()
{
    calcTime();
    glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);         // Clear The Screen And The Depth Buffer
    glColor4f (1,1,1,1);

    glLoadIdentity();
    glTranslatef(-game->ships[0]->position[0],-game->ships[0]->position[1],-30);
    //  glTranslatef(0,0,-30);

    drawAxis(0,0,0);
    glColor3f( 0.0, 1.0, 1.0 );
    wMesh->drawPolygon(-width*0.023,-height*0.023,0);


    drawShip();
    drawModules();
    drawMissles();
    drawAsteroids();


//   DrawQuadTexture(obiekty[0]->position[0],obiekty[0]->position[1],3,3,obiekty[0]->fOrientation, statek.imageID);

//    DrawQuadTexture(2.0f,2.0f,5.0f,5.0f,a[0]->myId);



    // drawAxis(0,0,0);
    //glPushMatrix();
    // wMesh->drawPolygon(-width*0.023,-height*0.023,0);

    glPopMatrix();
    glColor3f( 0.0, 1.0, 1.0 );

    glLoadIdentity();
    freetype::print(a, 77, 77, "Siemanko....");
    CEGUI::System::getSingleton().renderAllGUIContexts();

    glPushMatrix();

    glTranslatef(0.0f, 0.0f, -15.0f);


    //obiekty.drawAll();

    //DrawQuadTexture(1, 1, 10, 10, statek.imageID);





    SDL_GL_SwapWindow(window);
}
Example #30
0
void Draw(void){
	glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
	//視点の変換行列の初期化
	glLoadIdentity();
	//視点の決定
	gluLookAt(LookAt[1][0],LookAt[1][1],LookAt[1][2],
		LookAt[0][0],LookAt[0][1],LookAt[0][2],
		0.0, 1.0, 0.0);
	//視点の移動
	drawAxis();
	glFlush();
}