From a1fc4b986cd58e1f59f89dd52a56a0557aadd7ac Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 17 Aug 2004 18:56:24 +0000 Subject: [PATCH] Changed sizeof(..) references to 1,2,4 respectively. --- src/osg/PrimitiveSet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osg/PrimitiveSet.cpp b/src/osg/PrimitiveSet.cpp index f125c8f82..0ac70f527 100644 --- a/src/osg/PrimitiveSet.cpp +++ b/src/osg/PrimitiveSet.cpp @@ -88,7 +88,7 @@ void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const { extensions->glGenBuffers(1, &buffer); extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, buffer); - extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * sizeof(GL_UNSIGNED_BYTE), &front(), GL_STATIC_DRAW_ARB); + extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * 1, &front(), GL_STATIC_DRAW_ARB); } else { @@ -136,7 +136,7 @@ void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const { extensions->glGenBuffers(1, &buffer); extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, buffer); - extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * sizeof(GL_UNSIGNED_SHORT), &front(), GL_STATIC_DRAW_ARB); + extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * 2, &front(), GL_STATIC_DRAW_ARB); } else { @@ -184,7 +184,7 @@ void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const { extensions->glGenBuffers(1, &buffer); extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, buffer); - extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * sizeof(GL_UNSIGNED_INT), &front(), GL_STATIC_DRAW_ARB); + extensions->glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, size() * 4, &front(), GL_STATIC_DRAW_ARB); } else {