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: gluQuadrics and 1D texturing and skybox

  1. #1
    Intern Contributor
    Join Date
    Nov 2002
    Location
    Torun/Poland
    Posts
    58

    gluQuadrics and 1D texturing and skybox

    Hello
    Is it convenient and easy to create skybox using gluSphere and 1D texture looking as clear sky (in the middle white and on ends blue) ??

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    2

    Re: gluQuadrics and 1D texturing and skybox

    glNewList(LIST[3],GL_COMPILE);
    glPushMatrix();
    glTranslatef(0.0, 13000.0, 0.0);


    glDisable(GL_TEXTURE_2D);
    ObjSky.bindTex1D(); //Texture object, Loaded a Bmp size of 1x512
    glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
    glMatrixMode(GL_TEXTURE);
    glPushMatrix();
    //glLoadIdentity();
    glScalef(2.0,0.0,0.0);
    glTranslatef(-0.51f,0,0);
    glRotatef(-90.0f,0.0,0.0,1.0f);
    glMatrixMode(GL_MODELVIEW);
    ObjSky.draw(); //an obj model

    glMatrixMode(GL_TEXTURE);
    glPopMatrix();
    glMatrixMode(GL_MODELVIEW);
    glPopMatrix();
    glDisable(GL_TEXTURE_1D);
    glEnable(GL_TEXTURE_2D);

    glEndList();

Posting Permissions

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