Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/DerivedMesh.c
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
| #ifdef WITH_GAMEENGINE | #ifdef WITH_GAMEENGINE | ||||
| #include "BKE_navmesh_conversion.h" | #include "BKE_navmesh_conversion.h" | ||||
| static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm); | static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm); | ||||
| #endif | #endif | ||||
| #include "BLI_sys_types.h" /* for intptr_t support */ | #include "BLI_sys_types.h" /* for intptr_t support */ | ||||
| #include "GPU_buffers.h" | #include "GPU_buffers.h" | ||||
| #include "GPU_legacy_stubs.h" | |||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #ifdef WITH_OPENSUBDIV | #ifdef WITH_OPENSUBDIV | ||||
| # include "BKE_depsgraph.h" | # include "BKE_depsgraph.h" | ||||
| # include "DNA_userdef_types.h" | # include "DNA_userdef_types.h" | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 3,735 Lines • ▼ Show 20 Lines | void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert, int loop) | ||||
| UNUSED_VARS(a, vert); | UNUSED_VARS(a, vert); | ||||
| /* orco texture coordinates */ | /* orco texture coordinates */ | ||||
| if (attribs->totorco) { | if (attribs->totorco) { | ||||
| /*const*/ float (*array)[3] = attribs->orco.array; | /*const*/ float (*array)[3] = attribs->orco.array; | ||||
| const float *orco = (array) ? array[index] : zero; | const float *orco = (array) ? array[index] : zero; | ||||
| if (attribs->orco.gl_texco) | if (attribs->orco.gl_texco) | ||||
| glTexCoord3fv(orco); | oldTexCoord3fv(orco); | ||||
| else | else | ||||
| glVertexAttrib3fv(attribs->orco.gl_index, orco); | glVertexAttrib3fv(attribs->orco.gl_index, orco); | ||||
| } | } | ||||
| /* uv texture coordinates */ | /* uv texture coordinates */ | ||||
| for (b = 0; b < attribs->tottface; b++) { | for (b = 0; b < attribs->tottface; b++) { | ||||
| const float *uv; | const float *uv; | ||||
| if (attribs->tface[b].array) { | if (attribs->tface[b].array) { | ||||
| const MLoopUV *mloopuv = &attribs->tface[b].array[loop]; | const MLoopUV *mloopuv = &attribs->tface[b].array[loop]; | ||||
| uv = mloopuv->uv; | uv = mloopuv->uv; | ||||
| } | } | ||||
| else { | else { | ||||
| uv = zero; | uv = zero; | ||||
| } | } | ||||
| if (attribs->tface[b].gl_texco) | if (attribs->tface[b].gl_texco) | ||||
| glTexCoord2fv(uv); | oldTexCoord2fv(uv); | ||||
| else | else | ||||
| glVertexAttrib2fv(attribs->tface[b].gl_index, uv); | glVertexAttrib2fv(attribs->tface[b].gl_index, uv); | ||||
| } | } | ||||
| /* vertex colors */ | /* vertex colors */ | ||||
| for (b = 0; b < attribs->totmcol; b++) { | for (b = 0; b < attribs->totmcol; b++) { | ||||
| GLfloat col[4]; | GLfloat col[4]; | ||||
| ▲ Show 20 Lines • Show All 561 Lines • Show Last 20 Lines | |||||