Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: My Rectangles drawing at wrong position?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    5

    My Rectangles drawing at wrong position?

    Hello. Me again i make my rectangles x 0 but they drawing at end
    Code :
    #include <GL/glut.h>
    #include <stdlib.h>
    GLfloat aci;
    void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far);
    void gluPerspective(GLdouble fov, GLdouble aspect, GLdouble near, GLdouble far);
    void ayarlar(void)
    {
    glClearColor(0.0,0.0,0.0,0.0);
    glShadeModel(GL_SMOOTH);
    gluPerspective(0.0,0.0, 0.0, 0.0);
    }
    void gosterim(void)
    {
     
    glMatrixMode (GL_PROJECTION);
    glMatrixMode (GL_MODELVIEW);
    glLoadIdentity ();
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 0.0, 0.0);
    glRotatef(aci,1.0,1,0.0);
    glBegin( GL_QUADS );
        glVertex3f(0.0f,0.0f,0.0f);
        glVertex3f(1.0f,0.0f,0.0f);
        glVertex3f(1.0f,1.0f,0.0f);
        glVertex3f(1.0f,1.0f,0.0f);
        glColor3i(1,1,0);
    glEnd();
    This is my camera and draw code. They drawing at last please help.

  2. #2
    Intern Contributor uwi2k2's Avatar
    Join Date
    Mar 2011
    Posts
    97
    hi,

    its hard to understand what your problem is.
    can you pls make a screenshot and try to write a bit better english.

    cu
    uwi2k2
    uwi2k2 - OpenGL Trainer: www.opengl-trainer.com
    ---------------------------------------------------------
    Free Programming Helpline: www.programming-hotline.com
    ---------------------------------------------------------
    A Friday Night Programmer: www.uwiworld.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •