Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: ramy1989

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,253

    Deprecated OpenGL 2.0 functions

    I am moving to a programmable pipeline and I would know what are all the functions (or things) deprecated in OpenGL 2.0; I saw many sites mentioning what is deprecated in OpenGL 2.0, but no one says...
  2. Replies
    1
    Views
    1,028

    Dynamically change the material color

    Before the glutMainLoop I define the lights and material colors:



    glShadeModel(GL_FLAT);

    glMaterialfv(GL_FRONT, GL_AMBIENT, (const GLfloat[]){1,0.2,0} );
    ...
  3. Replies
    4
    Views
    1,362

    Nothing to do, I tried this: ...

    Nothing to do, I tried this:



    glBegin(GL_TRIANGLES);

    glVertex2f(0, 0);
    glTexCoord2d(0, 0);

    glVertex2f(40, 0);
  4. Replies
    4
    Views
    1,362

    Image loaded from texture is dirty

    I have a TGA file with contains this image:

    917

    The texture is 256x256.
    So I'm trying to load it and map it to a cube:



    #import <OpenGL/OpenGL.h>
  5. Replies
    1
    Views
    1,241

    Size of glMaterialfv and glLightfv array

    I am using glMaterialfv and glLightfv to set the material and lights properties of an object.
    I have a doubt about the size of the array that have to be passed as argument, the documentation I'm...
  6. Replies
    1
    Views
    1,260

    3D pyramid appears scattered

    I have a struct that I called pyramid:



    typedef struct
    {
    GLfloat xUp;
    GLfloat yUp;
    GLfloat zUp;
    GLfloat base;
  7. Replies
    3
    Views
    1,200

    I reviewed the code and got this way to draw an...

    I reviewed the code and got this way to draw an entire cube:



    #import <OpenGL/OpenGL.h>
    #import <GLUT/GLUT.h>


    int width=500, height=500, depth=500;
  8. Replies
    3
    Views
    1,200

    I modified the code this way: ...

    I modified the code this way:



    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    gluLookAt(250, 250, 0, -250, 250, 250, 0, 1, 0);
    glRotatef(45, 0, 1, 0);
  9. Replies
    3
    Views
    1,200

    Cube doesn't rotate

    Here I am trying to draw a cube with three faces.One face is red, one green and one blue.
    Then I rotate the cube in a way that I should see half of the red face and half of the green face, of 45...
  10. Ok but it seems like I'm missing something of how...

    Ok but it seems like I'm missing something of how matrixes work, if I add a roratef before the glTranslatef:



    glRotatef(0.01, 1.0, 0.0, 0.0);


    Again nothing is displayed, what am I missing...
  11. glTranslatef improperly used: nothing displayed

    I am trying to write a simple application with xcode that displaces a quad.For this I am using glTranslatef.The evidenced part of the code is where I try to translate the points.



    #import...
  12. Draw a polygon when mouse is clicked, issue

    The goal is: I have a window initialized with GLUT (600x600), it's all white, I have to listen the mouse, and paint it red when the mouse is clicked.
    So whenever the mouse is clicked, it must become...
Results 1 to 12 of 12