Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osg/PrimitiveSet>
|
||||
@@ -30,17 +30,17 @@ unsigned int PrimitiveSet::getNumPrimitives() const
|
||||
case(TRIANGLE_STRIP):
|
||||
case(TRIANGLE_FAN):
|
||||
case(QUAD_STRIP):
|
||||
case(PATCHES):
|
||||
case(PATCHES):
|
||||
case(POLYGON): return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DrawArrays::draw(State& state, bool) const
|
||||
void DrawArrays::draw(State& state, bool) const
|
||||
{
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
GLenum mode = _mode;
|
||||
if (_mode==GL_QUADS)
|
||||
if (_mode==GL_QUADS)
|
||||
{
|
||||
state.drawQuads(_first, _count, _numInstances);
|
||||
return;
|
||||
@@ -94,8 +94,8 @@ unsigned int DrawArrayLengths::getNumPrimitives() const
|
||||
void DrawArrayLengths::draw(State& state, bool) const
|
||||
{
|
||||
GLenum mode = _mode;
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
if (_mode==GL_QUADS)
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
if (_mode==GL_QUADS)
|
||||
{
|
||||
GLint first = _first;
|
||||
for(vector_type::const_iterator itr=begin();
|
||||
@@ -105,7 +105,7 @@ void DrawArrayLengths::draw(State& state, bool) const
|
||||
state.drawQuads(first, *itr, _numInstances);
|
||||
first += *itr;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
|
||||
@@ -164,10 +164,10 @@ DrawElementsUByte::~DrawElementsUByte()
|
||||
releaseGLObjects();
|
||||
}
|
||||
|
||||
void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
|
||||
void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
|
||||
{
|
||||
GLenum mode = _mode;
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
|
||||
if (mode==GL_QUAD_STRIP) mode = GL_TRIANGLE_STRIP;
|
||||
#endif
|
||||
@@ -187,7 +187,7 @@ void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_BYTE, &front());
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(), GL_UNSIGNED_BYTE, &front(), _numInstances);
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_BYTE, &front());
|
||||
@@ -220,10 +220,10 @@ DrawElementsUShort::~DrawElementsUShort()
|
||||
releaseGLObjects();
|
||||
}
|
||||
|
||||
void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
|
||||
void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
|
||||
{
|
||||
GLenum mode = _mode;
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
|
||||
if (mode==GL_QUAD_STRIP) mode = GL_TRIANGLE_STRIP;
|
||||
#endif
|
||||
@@ -243,7 +243,7 @@ void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, &front());
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(), GL_UNSIGNED_SHORT, &front(), _numInstances);
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, &front());
|
||||
@@ -276,10 +276,10 @@ DrawElementsUInt::~DrawElementsUInt()
|
||||
releaseGLObjects();
|
||||
}
|
||||
|
||||
void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
|
||||
void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
|
||||
{
|
||||
GLenum mode = _mode;
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
|
||||
if (mode==GL_QUAD_STRIP) mode = GL_TRIANGLE_STRIP;
|
||||
#endif
|
||||
@@ -299,7 +299,7 @@ void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_INT, &front());
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(), GL_UNSIGNED_INT, &front(), _numInstances);
|
||||
else glDrawElements(mode, size(), GL_UNSIGNED_INT, &front());
|
||||
|
||||
Reference in New Issue
Block a user