home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 19 / AACD19.BIN / AACD / Programming / MCC_GLArea / MCC_GLArea_Dev / GLArea_Demo / Background.c next >
Encoding:
C/C++ Source or Header  |  1999-11-07  |  1.8 KB  |  47 lines

  1. /*------------------------------------------------------
  2.   -OpenGL source code                                  -
  3.   -Generated with VRMLEditor V 0.64 Beta (on Amiga)    -
  4.   -Written by BODMER Stephan (bodmer2@uni2a.unige.ch)  -
  5.   -VRMLEditor is Copyright(1997/98) by BodySoft        -
  6.   ------------------------------------------------------*/
  7. #include <proto/Amigamesa.h>
  8.  
  9. #include <mui/GLArea_mcc.h>
  10.  
  11. void DrawGround(struct GLContext *glcontext) {
  12.     struct Library *glBase=glcontext->gl_Base;
  13.     struct Library *gluBase=glcontext->glu_Base;
  14.     struct Library *glutBase=glcontext->glut_Base;
  15.  
  16.     /*
  17.     glTexParameteri_stub(glcontext,GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
  18.     glTexParameteri_stub(glcontext,GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
  19.     glTexParameteri_stub(glcontext,GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
  20.     glTexParameteri_stub(glcontext,GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
  21.     glTexImage2D_stub(glcontext,GL_TEXTURE_2D,0,GL_RGB,128,128,0,GL_RGB,GL_UNSIGNED_BYTE,solimage);
  22.     */
  23.     // IndexedFaceSet
  24.     glBegin(GL_POLYGON);
  25.     {
  26.      GLfloat ambient[]={0.20,0.20,0.50,1.00};
  27.      GLfloat diffuse[]={0.50,0.50,0.90,1.00};
  28.      GLfloat specular[]={0.00,0.00,0.00,1.00};
  29.      GLfloat emissive[]={0.00,0.00,0.00,1.00};
  30.      glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT,ambient);
  31.      glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,diffuse);
  32.      glMaterialfv(GL_FRONT_AND_BACK,GL_SPECULAR,specular);
  33.      glMaterialfv(GL_FRONT_AND_BACK,GL_EMISSION,emissive);
  34.      glMaterialf(GL_FRONT_AND_BACK,GL_SHININESS,25.60);
  35.     };
  36.         glNormal3d(0.0000,0.0000,1.0000);
  37.         glTexCoord2d(1.0,0.0);
  38.         glVertex3d(5.0000,0.0000,-5.0000);
  39.         glTexCoord2d(1.0,1.0);
  40.         glVertex3d(5.0000,6.0000,-5.0000);
  41.         glTexCoord2d(0.0,1.0);
  42.         glVertex3d(-5.0000,6.0000,-5.0000);
  43.         glTexCoord2d(0.0,0.0);
  44.         glVertex3d(-5.0000,0.0000,-5.0000);
  45.     glEnd();
  46. }
  47.