Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8740 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jun 23, 2006, 11:22:37 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: now the elements are draw correctly

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r8518 r8740  
    615615      dynamic_cast<GraphicsEffect*>(*it)->draw();
    616616  }
    617   GraphicsEngine::storeMatrices();
    618617  Shader::suspendShader();
    619618  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
  • trunk/src/lib/gui/gl/glgui_button.cc

    r8717 r8740  
    100100  bool GLGuiButton::processEvent(const Event& event)
    101101  {
    102     if (event.type == SDLK_SPACE && !event.bPressed)
     102    if (event.type == SDLK_SPACE)
    103103    {
    104       emit(released());
     104      if (event.bPressed)
     105        emit(pushed());
     106      else
     107        emit(released());
    105108      return true;
    106109    }
  • trunk/src/story_entities/game_world.cc

    r8724 r8740  
    193193  //b->setName("b");
    194194
    195  
     195
    196196  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
    197197
     
    305305    this->tick ();
    306306
    307    
     307
    308308    /* update the state */
    309     this->update ();
    310 
    311    
     309    //this->update (); /// LESS REDUNDANCY.
     310    PNode::getNullParent()->updateNode(this->dtS);
     311
     312
    312313    /* collision detection */
    313314    this->collisionDetection ();
     
    317318    /* check the game rules */
    318319    this->checkGameRules();
    319    
     320
    320321    /* update the state */
    321322    this->update ();
     
    438439  PNode::getNullParent()->updateNode (this->dtS);
    439440  OrxSound::SoundEngine::getInstance()->update();
     441
     442  this->applyCameraSettings();
    440443  GraphicsEngine::getInstance()->update(this->dtS);
    441444}
     
    515518
    516519
     520void GameWorld::applyCameraSettings()
     521{
     522  this->dataTank->localCamera->apply ();
     523  this->dataTank->localCamera->project ();
     524  GraphicsEngine::storeMatrices();
     525}
     526
     527
    517528
    518529/**
     
    523534    // clear buffer
    524535  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    525   glLoadIdentity();
     536//  glLoadIdentity();
    526537
    527538  const std::list<BaseObject*>* reflectedWaters;
     
    536547
    537548      //camera and light
    538       this->dataTank->localCamera->apply ();
    539       this->dataTank->localCamera->project ();
     549      //this->dataTank->localCamera->apply ();
     550      //this->dataTank->localCamera->project ();
    540551
    541552      LightManager::getInstance()->draw();
     
    565576    // clear buffer
    566577  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    567   glLoadIdentity();
     578  //glLoadIdentity();
    568579
    569580  const std::list<BaseObject*>* reflectedWaters;
     
    578589
    579590      //camera and light
    580       this->dataTank->localCamera->apply ();
    581       this->dataTank->localCamera->project ();
     591      //this->dataTank->localCamera->apply ();
     592      //this->dataTank->localCamera->project ();
    582593      // prepare for reflection rendering
    583594      mw->activateRefraction();
     
    607618
    608619
    609   glEnable(GL_DEPTH_TEST);
    610   glEnable(GL_LIGHTING);
    611 
    612   // set camera
    613   this->dataTank->localCamera->apply ();
    614   this->dataTank->localCamera->project ();
     620  // glEnable(GL_DEPTH_TEST);
     621  // glEnable(GL_LIGHTING);
     622
     623  // set Lighting
    615624  LightManager::getInstance()->draw();
    616625
     626  /* Draw the BackGround */
    617627  this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND));
    618628  engine->drawBackgroundElements();
  • trunk/src/story_entities/game_world.h

    r8271 r8740  
    7373    virtual void collisionReaction();
    7474
     75    void applyCameraSettings();
    7576    void drawEntityList(const ObjectManager::EntityList& drawList ) const;
    7677    virtual void renderPassReflection();
  • trunk/src/story_entities/menu/glgui_imagebutton.cc

    r8717 r8740  
    3838  void GLGuiImageButton::releasing(const Vector2D& pos, bool focused)
    3939  {
     40    GLGuiPushButton::releasing(pos, focused);
    4041    if (focused)
    4142      this->emit(startLevel(this->levelID));
     
    5556  {
    5657    GLGuiPushButton::showing();
    57     this->image->show();
     58
     59    //this->image->show();
    5860  }
    5961
     
    6264    GLGuiPushButton::hiding();
    6365
    64     this->image->hide();
     66    //this->image->hide();
     67  }
     68
     69  bool GLGuiImageButton::processEvent(const Event& event)
     70  {
     71    if (event.type == SDLK_SPACE)
     72    {
     73      if (event.bPressed)
     74  //      emit(pushed());
     75        ;
     76      else
     77      {
     78//        emit(released());
     79        emit(startLevel(this->levelID));
     80      }
     81      return true;
     82    }
     83    return false;
    6584  }
    6685
    6786
     87
    6888}
  • trunk/src/story_entities/menu/glgui_imagebutton.h

    r8717 r8740  
    11/*!
    2  * @file shell.h
    3  * Definition of a on-screen-shell
     2 * @file glgui_imagebutton.h
    43 *
    5  * @todo Buffer Display in different Colors for different debug mode.
    6  * @todo choose color of the Font and the background.
    74 */
    85
     
    2522
    2623
     24    void push();
     25    void release();
     26
    2727    DeclareSignal1(startLevel, int);
    2828
     
    3535    virtual void hiding();
    3636
    37 
     37    virtual bool processEvent(const Event& event);
    3838  private:
    3939    unsigned int        levelID;
Note: See TracChangeset for help on using the changeset viewer.