~ubuntu-branches/debian/sid/coin2/sid

« back to all changes in this revision

Viewing changes to src/shapenodes/SoLineSet.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-06-28 02:38:17 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080628023817-lgrh0u677j1gcqgf
Tags: 2.5.0-2
* debian/control: Change suggests from libopenal0 to libopenal0a.
  Closes: #488001.  Change ${Source-Version} to ${binary:Version}.
  Update to standards version 3.8.0.

* debian/rules: Do not ignore errors in clean rule.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**************************************************************************\
2
2
 *
3
3
 *  This file is part of the Coin 3D visualization library.
4
 
 *  Copyright (C) 1998-2006 by Systems in Motion.  All rights reserved.
 
4
 *  Copyright (C) 1998-2007 by Systems in Motion.  All rights reserved.
5
5
 *
6
6
 *  This library is free software; you can redistribute it and/or
7
7
 *  modify it under the terms of the GNU General Public License
573
573
void
574
574
SoLineSet::GLRender(SoGLRenderAction * action)
575
575
{
576
 
  if (!this->shouldGLRender(action)) return;
577
 
 
578
 
  int32_t idx = this->startIndex.getValue();
579
 
  int32_t dummyarray[1];
580
 
  const int32_t * ptr = this->numVertices.getValues(0);
581
 
  const int32_t * end = ptr + this->numVertices.getNum();
582
 
  if ((end - ptr == 1) && ptr[0] == 0) return; // nothing to render
583
 
 
584
576
  SoState * state = action->getState();
585
 
  this->fixNumVerticesPointers(state, ptr, end, dummyarray);
586
 
   
587
577
  SbBool didpush = FALSE;
 
578
 
588
579
  if (this->vertexProperty.getValue()) {
589
580
    state->push();
590
581
    didpush = TRUE;
591
582
    this->vertexProperty.getValue()->GLRender(action);
592
583
  }
593
584
 
 
585
  if (!this->shouldGLRender(action)) {
 
586
    if (didpush) {
 
587
      state->pop();
 
588
    }
 
589
    return;
 
590
  }
 
591
 
 
592
  int32_t idx = this->startIndex.getValue();
 
593
  int32_t dummyarray[1];
 
594
  const int32_t * ptr = this->numVertices.getValues(0);
 
595
  const int32_t * end = ptr + this->numVertices.getNum();
 
596
  if ((end - ptr == 1) && ptr[0] == 0) {
 
597
    if (didpush) state->pop();
 
598
    return; // nothing to render
 
599
  }
 
600
  this->fixNumVerticesPointers(state, ptr, end, dummyarray);
 
601
   
 
602
 
594
603
  SoMaterialBundle mb(action);
595
604
  SoTextureCoordinateBundle tb(action, TRUE, FALSE);
596
605
  SbBool doTextures = tb.needCoordinates();