Combining skia and opengl 3d

57 views
Skip to first unread message

Zhenobi MCPE

unread,
Dec 25, 2019, 1:37:05 AM12/25/19
to skia-discuss
Drawing opengl or skia cancel each other out. What is the proper way to combine them?

KnIfER

unread,
Sep 7, 2021, 7:30:54 AMSep 7
to skia-discuss
wglMakeCurrent...

// reset gl states[1]
glEnable(GL_CULL_FACE);
glUseProgram(0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
gl draw ...

// reset skia gl context
context->resetContext(GrGLBackendState::kALL_GrGLBackendState);
skia draw ...


Not perfect. In this demo the cube gets streched after the window is resized.


Reply all
Reply to author
Forward
0 new messages