git-svn-id: svn://db.shs.com.ru/libs@46 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -184,17 +184,15 @@ void GLVBO::draw(GLenum type, QGLShaderProgram * prog, bool simplest) {
|
||||
if (!simplest) {
|
||||
if (has_normals) {
|
||||
glEnableClientState(GL_NORMAL_ARRAY);
|
||||
glNormalPointer(GL_FLOAT, 0, offset);
|
||||
offset = (void*)(llong(offset) + vert_count * 3 * sizeof(GLfloat));
|
||||
glNormalPointer(GL_FLOAT, 0, offsets[0]);
|
||||
} else glDisableClientState(GL_NORMAL_ARRAY);
|
||||
if (has_texcoords) {
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, offset);
|
||||
offset = (void*)(llong(offset) + vert_count * 2 * sizeof(GLfloat));
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, offsets[1]);
|
||||
} else glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
if (has_colors) {
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glColorPointer(4, GL_FLOAT, 0, offset);
|
||||
glColorPointer(4, GL_FLOAT, 0, offsets[2]);
|
||||
} else glDisableClientState(GL_COLOR_ARRAY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user