Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/display_driver.cpp
| Show First 20 Lines • Show All 929 Lines • ▼ Show 20 Lines | void BlenderDisplayDriver::draw(const Params ¶ms) | ||||
| if (gl_upload_sync_) { | if (gl_upload_sync_) { | ||||
| glWaitSync((GLsync)gl_upload_sync_, 0, GL_TIMEOUT_IGNORED); | glWaitSync((GLsync)gl_upload_sync_, 0, GL_TIMEOUT_IGNORED); | ||||
| } | } | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | ||||
| /* Do not overwrite current depth. */ | |||||
| glDepthMask(GL_FALSE); | |||||
brecht: I think this would be better done in `draw/engines/external/external_engine.c`, so other render… | |||||
| glActiveTexture(GL_TEXTURE0); | glActiveTexture(GL_TEXTURE0); | ||||
| /* NOTE: The VAO is to be allocated on the drawing context as it is not shared across contexts. | /* NOTE: The VAO is to be allocated on the drawing context as it is not shared across contexts. | ||||
| * Simplest is to allocate it on every redraw so that it is possible to destroy it from a | * Simplest is to allocate it on every redraw so that it is possible to destroy it from a | ||||
| * correct context. */ | * correct context. */ | ||||
| GLuint vertex_array_object; | GLuint vertex_array_object; | ||||
| glGenVertexArrays(1, &vertex_array_object); | glGenVertexArrays(1, &vertex_array_object); | ||||
| glBindVertexArray(vertex_array_object); | glBindVertexArray(vertex_array_object); | ||||
| ▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines | |||||
I think this would be better done in draw/engines/external/external_engine.c, so other render engines get the same fix.
This should then be done in both external_draw_scene_do_v3d and external_draw_scene_do_image.