Same code diffrent shows between 1.0 and 1.1

This topic contains 1 reply, has 1 voice, and was last updated by  italylili 7 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30013

    italylili
    Member
    I use the follow code, but this code got a blue square in the opengles1.0,but got black square in

    the 1.1 , how could this happen?

     

     

    glEnable(GL_COLOR_MATERIAL);
     static GLubyte indicestext[]={0,1,2,1,3,2};
     VERTTYPE pfVerticestext[]= {f2vt(-.5f),f2vt(-.5f),f2vt(0),
      f2vt(+.5f),f2vt(-.5f),f2vt(0),
      f2vt(-.5),f2vt(.5f),f2vt(0),
      f2vt(+.5),f2vt(.5f),f2vt(0)};

     glEnableClientState(GL_VERTEX_ARRAY);
     glVertexPointer(3, VERTTYPEENUM, 0 ,pfVerticestext);

     glDisableClientState(GL_COLOR_ARRAY);
     glColor4x(0,0,65535,65535);

     VERTTYPE LightAmbient[]={0,0,65535,65535};
     
     glLightxv(GL_LIGHT7, GL_AMBIENT, LightAmbient);
     glEnable(GL_LIGHT7);
     glEnable(GL_LIGHTING);
     glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indicestext);

    #33626

    italylili
    Member

    Calling glEnable(GL_COLOR_MATERIAL) anywhere does not seem to work.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.