Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2006, 3:23:05 PM (18 years ago)
Author:
gfilip
Message:

little update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/test_entity.cc

    r10018 r10065  
    2525
    2626
    27 
     27#include "material.h"
    2828
    2929#include "state.h"
     
    7373  this->registerObject(this, TestEntity::_objectList);
    7474  this->toList(OM_GROUP_00);
     75
     76  this->material = new Material();
     77  this->material->setIllum(3);
     78  this->material->setDiffuse(1.0,1.0,1.0);
     79  this->material->setSpecular(0.0,0.0,0.0);
     80  this->material->setAmbient(1.0, 1.0, 1.0);
     81  this->material->setDiffuseMap("maps/TE2.tga");
    7582}
    7683
     
    93100  glDisable(GL_LIGHTING);
    94101//   glDisable(GL_BLEND);
    95 // 
     102//
    96103//   glEnable(GL_TEXTURE_2D);
    97104//   glBindTexture(GL_TEXTURE_2D, media_container->getFrameTexture(counter));
     
    104111//PRINTF(0)("axis: %f\n", axis);
    105112glEnable(GL_BLEND);     // Turn Blending On
    106  
     113
    107114
    108115
     
    121128  glEnd();
    122129
    123  // glPopMatrix();
    124  // glPopAttrib();
     130  glPopMatrix();
     131  glPopAttrib();
    125132}
    126133
     
    130137void TestEntity::tick (float time)
    131138{
    132 if (state==0)
    133 i=0;
    134 else
    135 i=i+0.005;
    136 
    137 
    138 
    139 
     139  if (state==0 && i==1)
     140    i=0;
     141  if (state==1 && i<=1)
     142    i=i+0.005;
    140143}
    141144
    142145
    143 //void TestEntity::changeState (bool sta)
    144 //{
    145 //state=sta;
    146 //}
     146void TestEntity::changeState (bool sta)
     147{
     148  state=sta;
     149}
Note: See TracChangeset for help on using the changeset viewer.