Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_batch.cc
| Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | if (batch->verts[v] == nullptr) { | ||||
| return v; | return v; | ||||
| } | } | ||||
| } | } | ||||
| /* we only make it this far if there is no room for another GPUVertBuf */ | /* we only make it this far if there is no room for another GPUVertBuf */ | ||||
| BLI_assert_msg(0, "Not enough VBO slot in batch"); | BLI_assert_msg(0, "Not enough VBO slot in batch"); | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| bool GPU_batch_vertbuf_has(GPUBatch *batch, GPUVertBuf *verts) | |||||
| { | |||||
| for (uint v = 0; v < GPU_BATCH_VBO_MAX_LEN; v++) { | |||||
| if (batch->verts[v] == verts) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Uniform setters | /** \name Uniform setters | ||||
| * | * | ||||
| * TODO(fclem): port this to GPUShader. | * TODO(fclem): port this to GPUShader. | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||