Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/cdderivedmesh.c
| Context not available. | |||||
| BKE_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors, | BKE_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors, | ||||
| setMaterial, false, false); | setMaterial, false, false); | ||||
| glShadeModel(GL_FLAT); | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| GPU_vertex_setup(dm); | GPU_vertex_setup(dm); | ||||
| GPU_normal_setup(dm); | GPU_normal_setup(dm); | ||||
| GPU_triangle_setup(dm); | GPU_triangle_setup(dm); | ||||
| glShadeModel(GL_SMOOTH); | |||||
| for (a = 0; a < dm->drawObject->totmaterial; a++) { | for (a = 0; a < dm->drawObject->totmaterial; a++) { | ||||
| if (!setMaterial || setMaterial(dm->drawObject->materials[a].mat_nr + 1, NULL)) { | if (!setMaterial || setMaterial(dm->drawObject->materials[a].mat_nr + 1, NULL)) { | ||||
| GPU_buffer_draw_elements( | GPU_buffer_draw_elements( | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| GPU_buffers_unbind(); | GPU_buffers_unbind(); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| static void cdDM_drawFacesTex_common( | static void cdDM_drawFacesTex_common( | ||||
| Context not available. | |||||
| if (mloopcol) { | if (mloopcol) { | ||||
| GPU_color_setup(dm, colType); | GPU_color_setup(dm, colType); | ||||
| } | } | ||||
| glShadeModel(GL_SMOOTH); | |||||
| /* lastFlag = 0; */ /* UNUSED */ | /* lastFlag = 0; */ /* UNUSED */ | ||||
| for (mat_index = 0; mat_index < dm->drawObject->totmaterial; mat_index++) { | for (mat_index = 0; mat_index < dm->drawObject->totmaterial; mat_index++) { | ||||
| GPUBufferMaterial *bufmat = dm->drawObject->materials + mat_index; | GPUBufferMaterial *bufmat = dm->drawObject->materials + mat_index; | ||||
| Context not available. | |||||
| } | } | ||||
| GPU_buffers_unbind(); | GPU_buffers_unbind(); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| glShadeModel(GL_SMOOTH); | |||||
| tot_tri_elem = dm->drawObject->tot_triangle_point; | tot_tri_elem = dm->drawObject->tot_triangle_point; | ||||
| Context not available. | |||||
| } | } | ||||
| GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); | GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); | ||||
| glShadeModel(GL_FLAT); | |||||
| GPU_buffers_unbind(); | GPU_buffers_unbind(); | ||||
| Context not available. | |||||
| matnr = -1; | matnr = -1; | ||||
| do_draw = false; | do_draw = false; | ||||
| glShadeModel(GL_SMOOTH); | |||||
| if (setDrawOptions != NULL) { | if (setDrawOptions != NULL) { | ||||
| DMVertexAttribs attribs; | DMVertexAttribs attribs; | ||||
| DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n"); | DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n"); | ||||
| Context not available. | |||||
| MEM_freeN(mat_orig_to_new); | MEM_freeN(mat_orig_to_new); | ||||
| MEM_freeN(matconv); | MEM_freeN(matconv); | ||||
| } | } | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| static void cdDM_drawFacesGLSL(DerivedMesh *dm, DMSetMaterial setMaterial) | static void cdDM_drawFacesGLSL(DerivedMesh *dm, DMSetMaterial setMaterial) | ||||
| Context not available. | |||||
| matnr = -1; | matnr = -1; | ||||
| glShadeModel(GL_SMOOTH); | |||||
| memset(&attribs, 0, sizeof(attribs)); | memset(&attribs, 0, sizeof(attribs)); | ||||
| glBegin(GL_TRIANGLES); | glBegin(GL_TRIANGLES); | ||||
| Context not available. | |||||
| cddm_draw_attrib_vertex(&attribs, mvert, a, vtri[2], ltri[2], 2, ln3, smoothnormal); | cddm_draw_attrib_vertex(&attribs, mvert, a, vtri[2], ltri[2], 2, ln3, smoothnormal); | ||||
| } | } | ||||
| glEnd(); | glEnd(); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| static void cdDM_drawMappedEdges(DerivedMesh *dm, DMSetDrawOptions setDrawOptions, void *userData) | static void cdDM_drawMappedEdges(DerivedMesh *dm, DMSetDrawOptions setDrawOptions, void *userData) | ||||
| Context not available. | |||||