Parcourir la source

mesa: use _mesa_sizeof_type() in vbo split code

tags/mesa_7_6_rc1
Brian Paul il y a 16 ans
Parent
révision
7e3bd457e8
1 fichiers modifiés avec 2 ajouts et 16 suppressions
  1. 2
    16
      src/mesa/vbo/vbo_split_copy.c

+ 2
- 16
src/mesa/vbo/vbo_split_copy.c Voir le fichier

@@ -31,6 +31,7 @@

#include "main/glheader.h"
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
#include "main/enums.h"
#include "main/mtypes.h"
@@ -101,24 +102,9 @@ struct copy_context {
};


static GLuint type_size( GLenum type )
{
switch(type) {
case GL_BYTE: return sizeof(GLbyte);
case GL_UNSIGNED_BYTE: return sizeof(GLubyte);
case GL_SHORT: return sizeof(GLshort);
case GL_UNSIGNED_SHORT: return sizeof(GLushort);
case GL_INT: return sizeof(GLint);
case GL_UNSIGNED_INT: return sizeof(GLuint);
case GL_FLOAT: return sizeof(GLfloat);
case GL_DOUBLE: return sizeof(GLdouble);
default: return 0;
}
}

static GLuint attr_size( const struct gl_client_array *array )
{
return array->Size * type_size(array->Type);
return array->Size * _mesa_sizeof_type(array->Type);
}



Chargement…
Annuler
Enregistrer