moss-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Moss-devel] CVS: moss/3Dsia/client/3Dcf/src Cfg.cxx, 1.1, 1.2 World.cxx


From: Felix Morgner <address@hidden>
Subject: [Moss-devel] CVS: moss/3Dsia/client/3Dcf/src Cfg.cxx, 1.1, 1.2 World.cxx, 1.10, 1.11
Date: Fri, 08 Aug 2003 15:59:58 -0400

Update of /cvsroot/moss/moss/3Dsia/client/3Dcf/src
In directory subversions:/tmp/cvs-serv29429

Modified Files:
        Cfg.cxx World.cxx 
Log Message:
Cubic Rulez !


Index: Cfg.cxx
===================================================================
RCS file: /cvsroot/moss/moss/3Dsia/client/3Dcf/src/Cfg.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Cfg.cxx     16 May 2003 17:49:24 -0000      1.1
--- Cfg.cxx     8 Aug 2003 19:59:53 -0000       1.2
***************
*** 40,44 ****
  CCfg::CCfg()
    {
!   m_bProbeResult = 1;
    } // CCfg::CCfg()
  
--- 40,44 ----
  CCfg::CCfg()
    {
!   m_bParseResult = 1;
    } // CCfg::CCfg()
  
***************
*** 47,51 ****
    } // CCfg::~CCfg()
  
! bool CCfg::ProbeCfg()
    {
    ifstream config("~/.3dcf.cfg");
--- 47,51 ----
    } // CCfg::~CCfg()
  
! bool CCfg::ParseCfg()
    {
    ifstream config("~/.3dcf.cfg");
***************
*** 53,61 ****
      {
      cerr << "Can not open configfile ~/.3dcf.cfg" << endl;
!     m_bProbeResult = 1;
      }
  
!   if(m_bProbeResult == 0) exit(-2);
!   return m_bProbeResult;
    } // bool CCfg::ProbeCfg()
    
--- 53,61 ----
      {
      cerr << "Can not open configfile ~/.3dcf.cfg" << endl;
!     m_bParseResult = 1;
      }
  
!   if(m_bParseResult == 0) exit(-2);
!   return m_bParseResult;
    } // bool CCfg::ProbeCfg()
    

Index: World.cxx
===================================================================
RCS file: /cvsroot/moss/moss/3Dsia/client/3Dcf/src/World.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** World.cxx   1 May 2003 18:45:50 -0000       1.10
--- World.cxx   8 Aug 2003 19:59:53 -0000       1.11
***************
*** 108,116 ****
    glDepthFunc(GL_LEQUAL);
    glEnable(GL_DEPTH_TEST);
!   glEnable(GL_BLEND);
    glEnable(GL_LIGHT0);
    glEnable(GL_LIGHTING);
    glEnable(GL_COLOR_MATERIAL);
!   glBlendFunc(GL_SRC_ALPHA, GL_ONE);
  //  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    glEnable(GL_POLYGON_SMOOTH);
--- 108,116 ----
    glDepthFunc(GL_LEQUAL);
    glEnable(GL_DEPTH_TEST);
! //  glEnable(GL_BLEND);
    glEnable(GL_LIGHT0);
    glEnable(GL_LIGHTING);
    glEnable(GL_COLOR_MATERIAL);
! //  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
  //  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    glEnable(GL_POLYGON_SMOOTH);
***************
*** 155,180 ****
    glRotatef(m_dZrot,0.0,0.0,1.0);
  
    // Positioning the light
    // the position is relative to the current coordinate
    // root in the moment, the light source will be positioned
    // thats why it has to be "absolute zero"
!   GLfloat light_position[] = { .0 , .0, .0, 1.0};
  
!   // Drawing a yellow sphere on the lights position
!   // (like a sun)
    glPushMatrix();
-   glColor3f(1.f,1.f,.0f);
-   glTranslatef(2.f, 5.f, -5.0);
    glLightfv(GL_LIGHT0, GL_POSITION, light_position);
-   glutSolidSphere(.2f, 32, 32);
-   gluLookAt(2,2,6,0,0,0,0,1,0);
    glPopMatrix();
  
!     DrawLabel("Welcome to \"3Dcf\"", afTextColor, -1.8, 1.0, -1.5, 0.003);
    // Creating the world cube
!   // all entities have to be in them
    glBegin(GL_QUADS);
  
!     glColor4f(0.5f, 1.0f, 0.5f, 0.99f);
      glVertex3f( 1.0f ,  1.0f, -1.0f); // 1
      glVertex3f(-1.0f ,  1.0f, -1.0f); // 4
--- 155,191 ----
    glRotatef(m_dZrot,0.0,0.0,1.0);
  
+ /* EVENTUALY ISN'T CORRECT ANYMORE */
    // Positioning the light
    // the position is relative to the current coordinate
    // root in the moment, the light source will be positioned
    // thats why it has to be "absolute zero"
!   
!   GLfloat light_position[] = { 5.0 , 5.0, -5.0, 1.0};
  
! //  glTranslatef(5.f, 5.f, -5.f);
    glPushMatrix();
    glLightfv(GL_LIGHT0, GL_POSITION, light_position);
    glPopMatrix();
  
! // Drawing a sun
!   glPushMatrix();
!     
!     glTranslatef(5.5, 5.5, -5.5);
!     glColor3f(1.f,1.f,.0f);
!     glutSolidSphere(.2f, 64, 64);
! 
!     // Gives a flikering while moving the scene //  glutSwapBuffers();
! 
!     gluLookAt(2,2,6,0,0,0,0,1,0);
! 
!   glPopMatrix();
!   
!   DrawLabel("Welcome to \"3Dcf\"", afTextColor, -1.8, 1.0, -1.5, 0.003);
!   
    // Creating the world cube
!   // all entities have to be in it
    glBegin(GL_QUADS);
  
!     glColor3f(0.5f, 1.0f, 0.5f); //.99
      glVertex3f( 1.0f ,  1.0f, -1.0f); // 1
      glVertex3f(-1.0f ,  1.0f, -1.0f); // 4
***************
*** 182,186 ****
      glVertex3f( 1.0f ,  1.0f,  1.0f); // 2
      
!     glColor4f(1.0f, 0.5f, 0.0f, 0.99f);
      glVertex3f( 1.0f, -1.0f,  1.0f);
      glVertex3f(-1.0f, -1.0f,  1.0f);
--- 193,197 ----
      glVertex3f( 1.0f ,  1.0f,  1.0f); // 2
      
!     glColor3f(1.0f, 0.5f, 0.0f); //.9
      glVertex3f( 1.0f, -1.0f,  1.0f);
      glVertex3f(-1.0f, -1.0f,  1.0f);
***************
*** 188,192 ****
      glVertex3f( 1.0f, -1.0f, -1.0f);
  
!     glColor4f(1.0f, 0.0f, 1.0f, 0.99f);
      glVertex3f( 1.0f,  1.0f,  1.0f);
      glVertex3f(-1.0f,  1.0f,  1.0f);
--- 199,203 ----
      glVertex3f( 1.0f, -1.0f, -1.0f);
  
!     glColor3f(1.0f, 0.0f, 1.0f); //.99
      glVertex3f( 1.0f,  1.0f,  1.0f);
      glVertex3f(-1.0f,  1.0f,  1.0f);
***************
*** 194,198 ****
      glVertex3f( 1.0f, -1.0f,  1.0f);
      
!     glColor4f(1.0f, 1.0f, 0.0f, 0.75f);
      glVertex3f( 1.0f, -1.0f,-1.0f);
      glVertex3f(-1.0f, -1.0f,-1.0f);
--- 205,209 ----
      glVertex3f( 1.0f, -1.0f,  1.0f);
      
!     glColor3f(1.0f, 1.0f, 0.0f); //.75
      glVertex3f( 1.0f, -1.0f,-1.0f);
      glVertex3f(-1.0f, -1.0f,-1.0f);
***************
*** 200,204 ****
      glVertex3f( 1.0f,  1.0f,-1.0f);
      
!     glColor4f(0.0f, 0.0f, 1.0f, 0.75f);
      glVertex3f(-1.0f,  1.0f, 1.0f);
      glVertex3f(-1.0f,  1.0f,-1.0f);
--- 211,215 ----
      glVertex3f( 1.0f,  1.0f,-1.0f);
      
!     glColor3f(0.0f, 0.0f, 1.0f); //.75
      glVertex3f(-1.0f,  1.0f, 1.0f);
      glVertex3f(-1.0f,  1.0f,-1.0f);
***************
*** 206,210 ****
      glVertex3f(-1.0f, -1.0f, 1.0f);
      
!     glColor4f(0.0f, 0.5f, 1.0f, 0.75f);
      glVertex3f( 1.0f,  1.0f,-1.0f);
      glVertex3f( 1.0f,  1.0f, 1.0f);
--- 217,221 ----
      glVertex3f(-1.0f, -1.0f, 1.0f);
      
!     glColor3f(0.0f, 0.5f, 1.0f); //.75
      glVertex3f( 1.0f,  1.0f,-1.0f);
      glVertex3f( 1.0f,  1.0f, 1.0f);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]