1
1
/**************************************************************************\
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.
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
574
574
SoLineSet::GLRender(SoGLRenderAction * action)
576
if (!this->shouldGLRender(action)) return;
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
584
576
SoState * state = action->getState();
585
this->fixNumVerticesPointers(state, ptr, end, dummyarray);
587
577
SbBool didpush = FALSE;
588
579
if (this->vertexProperty.getValue()) {
591
582
this->vertexProperty.getValue()->GLRender(action);
585
if (!this->shouldGLRender(action)) {
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
600
this->fixNumVerticesPointers(state, ptr, end, dummyarray);
594
603
SoMaterialBundle mb(action);
595
604
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
596
605
SbBool doTextures = tb.needCoordinates();