mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-19 12:09:06 +08:00
FIX: rendering: fix the slow issue of some model
jira: STUDIO-10461 Change-Id: I50f0ea1d10fdbe1c3abd6bb959ddd8f0f77bc982
This commit is contained in:
parent
d14e3f42a0
commit
312b85f486
@ -971,8 +971,6 @@ void GLModel::bind_mats_vbo(unsigned int instance_mats_vbo, unsigned int instanc
|
||||
glsafe(glVertexAttribDivisor(location + 1, 1));
|
||||
glsafe(glVertexAttribDivisor(location + 2, 1));
|
||||
glsafe(glVertexAttribDivisor(location + 3, 1));
|
||||
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, 0));
|
||||
}
|
||||
|
||||
void GLModel::render_geometry_instance(unsigned int instance_mats_vbo, unsigned int instances_count)
|
||||
@ -1060,6 +1058,7 @@ void GLModel::render_geometry_instance(unsigned int instance_mats_vbo, unsigned
|
||||
glsafe(::glDisableVertexAttribArray(instace_mats_id + 1));
|
||||
glsafe(::glDisableVertexAttribArray(instace_mats_id + 2));
|
||||
glsafe(::glDisableVertexAttribArray(instace_mats_id + 3));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, 0));
|
||||
}
|
||||
if (tex_coord_id != -1) glsafe(::glDisableVertexAttribArray(tex_coord_id));
|
||||
if (normal_id != -1) glsafe(::glDisableVertexAttribArray(normal_id));
|
||||
|
Loading…
x
Reference in New Issue
Block a user