mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Set some nicer Graphics3D context attributes to allow the GLES backend more flexibility when choosing a context
This commit is contained in:
parent
4f6c547e47
commit
abe66c7e21
11
viddec.cpp
11
viddec.cpp
@ -76,20 +76,21 @@ void MoonlightInstance::InitializeRenderingSurface(int width, int height) {
|
||||
}
|
||||
|
||||
int32_t contextAttributes[] = {
|
||||
PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8,
|
||||
PP_GRAPHICS3DATTRIB_BLUE_SIZE, 8,
|
||||
PP_GRAPHICS3DATTRIB_GREEN_SIZE, 8,
|
||||
PP_GRAPHICS3DATTRIB_RED_SIZE, 8,
|
||||
PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 0,
|
||||
PP_GRAPHICS3DATTRIB_STENCIL_SIZE, 0,
|
||||
PP_GRAPHICS3DATTRIB_SAMPLES, 0,
|
||||
PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS, 0,
|
||||
PP_GRAPHICS3DATTRIB_WIDTH, width,
|
||||
PP_GRAPHICS3DATTRIB_HEIGHT, height,
|
||||
PP_GRAPHICS3DATTRIB_NONE
|
||||
};
|
||||
g_Instance->m_Graphics3D = pp::Graphics3D(this, contextAttributes);
|
||||
|
||||
int32_t swapBehaviorAttribute[] = {
|
||||
PP_GRAPHICS3DATTRIB_SWAP_BEHAVIOR, PP_GRAPHICS3DATTRIB_BUFFER_DESTROYED,
|
||||
PP_GRAPHICS3DATTRIB_NONE
|
||||
};
|
||||
g_Instance->m_Graphics3D.SetAttribs(swapBehaviorAttribute);
|
||||
|
||||
if (!BindGraphics(m_Graphics3D)) {
|
||||
fprintf(stderr, "Unable to bind 3d context!\n");
|
||||
m_Graphics3D = pp::Graphics3D();
|
||||
|
Loading…
x
Reference in New Issue
Block a user