Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5399 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 18, 2005, 7:18:26 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: GL-GUI not rendered by Element2D anymore, lets see, if this proves usefull… i am not sure

Location:
trunk/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.h

    r5398 r5399  
    2727
    2828  E2D_LAYER_COUNT               =     4,         //!< The count of Layers.
     29
     30  E2D_LAYER_EXTERN              =    -1,         //!< In a Layers handeled externally.
    2931
    3032  E2D_LAYER_ALL                 =     5,
  • trunk/src/lib/graphics/render2D/render_2d.cc

    r5398 r5399  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
     
    6666void Render2D::registerElement2D(Element2D* element2D)
    6767{
    68   if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT)
     68  if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN)
    6969    this->element2DList[element2D->getLayer()]->add(element2D);
    7070  // DEBUG printf("::::%p, %d %d \n", element2D, element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize());
     
    8080void Render2D::unregisterElement2D(Element2D* element2D)
    8181{
    82   if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT)
     82  if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN)
    8383    this->element2DList[element2D->getLayer()]->remove(element2D);
    8484    // DEBUG  printf(":::%s layer: %d, %d\n", element2D->getClassName(), element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize());
     
    100100  if (likely(element2D->getLayer() != to))
    101101  {
    102     this->element2DList[element2D->getLayer()]->remove(element2D);
    103     this->element2DList[to]->add(element2D);
     102    if (element2D->getLayer() != E2D_LAYER_EXTERN)
     103      this->element2DList[element2D->getLayer()]->remove(element2D);
     104    if (to != E2D_LAYER_EXTERN)
     105      this->element2DList[to]->add(element2D);
    104106  }
    105107}
     
    136138  if (layer != E2D_LAYER_ALL)
    137139  {
    138     if (likely(this->element2DList[layer]->getSize() > 0))
     140    if (likely(layer != E2D_LAYER_EXTERN && this->element2DList[layer]->getSize() > 0))
    139141    {
    140142      tIterator<Element2D>* iterator = this->element2DList[layer]->getIterator();
     
    169171  GraphicsEngine::leave2DMode();
    170172}
     173
     174
  • trunk/src/lib/gui/gl_gui/glgui_button.cc

    r5395 r5399  
    5252  this->label = new Text();
    5353  this->label->setParent2D(this);
     54  this->label->setLayer(E2D_LAYER_EXTERN);
    5455}
    5556
  • trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc

    r5397 r5399  
    5454{
    5555  this->label->draw();
     56  printf("test");
    5657}
    5758
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5397 r5399  
    5151  this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
    5252  this->setParent2D((Element2D*)NULL);
     53  this->setLayer(E2D_LAYER_EXTERN);
    5354
    5455  this->backMat = NULL;
Note: See TracChangeset for help on using the changeset viewer.