Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_immediate_util.c
| Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | void immRecti_fast_with_color( | ||||
| immVertex2i(pos, x1, y2); | immVertex2i(pos, x1, y2); | ||||
| } | } | ||||
| #if 0 /* more complete version in case we want that */ | #if 0 /* more complete version in case we want that */ | ||||
| void immRecti_complete(int x1, int y1, int x2, int y2, const float color[4]) | void immRecti_complete(int x1, int y1, int x2, int y2, const float color[4]) | ||||
| { | { | ||||
| GPUVertFormat *format = immVertexFormat(); | GPUVertFormat *format = immVertexFormat(); | ||||
| uint pos = add_attr(format, "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); | uint pos = add_attr(format, "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| immUniformColor4fv(color); | immUniformColor4fv(color); | ||||
| immRecti(pos, x1, y1, x2, y2); | immRecti(pos, x1, y1, x2, y2); | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| } | } | ||||
| #endif | #endif | ||||
| void imm_cpack(uint x) | void imm_cpack(uint x) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 572 Lines • Show Last 20 Lines | |||||