Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/glutil.c
| Show All 20 Lines | |||||
| #include "IMB_colormanagement.h" | #include "IMB_colormanagement.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_matrix.h" | #include "GPU_matrix.h" | ||||
| #include "GPU_texture.h" | #include "GPU_texture.h" | ||||
| #ifdef __APPLE__ | #ifdef __APPLE__ | ||||
| # include "GPU_context.h" | |||||
| # include "GPU_state.h" | # include "GPU_state.h" | ||||
| #endif | #endif | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| /* ******************************************** */ | /* ******************************************** */ | ||||
| static void immDrawPixelsTexSetupAttributes(IMMDrawPixelsTexState *state) | static void immDrawPixelsTexSetupAttributes(IMMDrawPixelsTexState *state) | ||||
| ▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | #undef DATA | ||||
| immVertex2f(pos, rast_x + offset_left * xzoom, rast_y + top * yzoom * scaleY); | immVertex2f(pos, rast_x + offset_left * xzoom, rast_y + top * yzoom * scaleY); | ||||
| immEnd(); | immEnd(); | ||||
| /* NOTE: Weirdly enough this is only required on macOS. Without this there is some sort of | /* NOTE: Weirdly enough this is only required on macOS. Without this there is some sort of | ||||
| * bleeding of data is happening from tiles which are drawn later on. | * bleeding of data is happening from tiles which are drawn later on. | ||||
| * This doesn't seem to be too slow, | * This doesn't seem to be too slow, | ||||
| * but still would be nice to have fast and nice solution. */ | * but still would be nice to have fast and nice solution. */ | ||||
| #ifdef __APPLE__ | #ifdef __APPLE__ | ||||
| if (GPU_type_matches_ex(GPU_DEVICE_ANY, GPU_OS_MAC, GPU_DRIVER_ANY, GPU_BACKEND_OPENGL)) { | |||||
| GPU_flush(); | GPU_flush(); | ||||
| } | |||||
| #endif | #endif | ||||
| } | } | ||||
| } | } | ||||
| if (state->do_shader_unbind) { | if (state->do_shader_unbind) { | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 357 Lines • Show Last 20 Lines | |||||