Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader.cc
| Show First 20 Lines • Show All 521 Lines • ▼ Show 20 Lines | #ifndef NDEBUG | ||||
| Context *ctx = Context::get(); | Context *ctx = Context::get(); | ||||
| if (ctx->shader) { | if (ctx->shader) { | ||||
| ctx->shader->unbind(); | ctx->shader->unbind(); | ||||
| } | } | ||||
| ctx->shader = nullptr; | ctx->shader = nullptr; | ||||
| #endif | #endif | ||||
| } | } | ||||
| GPUShader *GPU_shader_get_bound() | |||||
| { | |||||
| Context *ctx = Context::get(); | |||||
| if (ctx) { | |||||
| return wrap(ctx->shader); | |||||
| } | |||||
| return nullptr; | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Shader name | /** \name Shader name | ||||
| * \{ */ | * \{ */ | ||||
| const char *GPU_shader_get_name(GPUShader *shader) | const char *GPU_shader_get_name(GPUShader *shader) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines | |||||