Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_state.c
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| glBlendFuncSeparate( | glBlendFuncSeparate( | ||||
| gpu_get_gl_blendfunction(src_rgb), | gpu_get_gl_blendfunction(src_rgb), | ||||
| gpu_get_gl_blendfunction(dst_rgb), | gpu_get_gl_blendfunction(dst_rgb), | ||||
| gpu_get_gl_blendfunction(src_alpha), | gpu_get_gl_blendfunction(src_alpha), | ||||
| gpu_get_gl_blendfunction(dst_alpha)); | gpu_get_gl_blendfunction(dst_alpha)); | ||||
| } | } | ||||
| void GPU_depth_range(float near, float far) | |||||
| { | |||||
| /* glDepthRangef is only for OpenGL 4.1 or higher */ | |||||
| glDepthRange(near, far); | |||||
| } | |||||
| void GPU_depth_test(bool enable) | void GPU_depth_test(bool enable) | ||||
| { | { | ||||
| if (enable) { | if (enable) { | ||||
| glEnable(GL_DEPTH_TEST); | glEnable(GL_DEPTH_TEST); | ||||
| } | } | ||||
| else { | else { | ||||
| glDisable(GL_DEPTH_TEST); | glDisable(GL_DEPTH_TEST); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||