Workaround external engines with OpenGL rendering
For now just do the OpenGL render and don't render using the engine. This is a slightly odd-use case since it makes more sense to do a regular render.
This commit is contained in:
@@ -175,8 +175,15 @@ static void external_draw_scene(void *UNUSED(vedata))
|
||||
|
||||
static void EXTERNAL_draw_scene(void *vedata)
|
||||
{
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
EXTERNAL_PassList *psl = ((EXTERNAL_Data *)vedata)->psl;
|
||||
external_draw_scene(vedata);
|
||||
|
||||
/* Will be NULL during OpenGL render.
|
||||
* OpenGL render is used for quick preview (thumbnails or sequencer preview)
|
||||
* where using the rendering engine to preview doesn't make so much sense. */
|
||||
if (draw_ctx->evil_C) {
|
||||
external_draw_scene(vedata);
|
||||
}
|
||||
DRW_draw_pass(psl->depth_pass);
|
||||
}
|
||||
|
||||
|
||||
@@ -2188,9 +2188,7 @@ void DRW_draw_view(const bContext *C)
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for both regular drawing and off-screen drawing.
|
||||
*
|
||||
* \param ofs: When not NULL, use this data to create the viewport.
|
||||
* Used for both regular and off-screen drawing.
|
||||
*/
|
||||
void DRW_draw_render_loop(
|
||||
struct Depsgraph *graph,
|
||||
|
||||
Reference in New Issue
Block a user