webxr: Use the same texture format as the original GL context's framebuffer when creating an XR GL layer.

This commit is contained in:
Josh Matthews 2019-09-19 17:46:09 -04:00
parent 778b48fa47
commit 5bd1e86d42
6 changed files with 43 additions and 17 deletions

View file

@ -91,6 +91,8 @@ pub struct WebGLCreateContextResult {
pub glsl_version: WebGLSLVersion,
/// The GL API used by the context.
pub api_type: GlType,
/// The format for creating new offscreen framebuffers for this context.
pub framebuffer_format: GLFormats,
}
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)]
@ -886,3 +888,9 @@ pub struct GLLimits {
pub max_vertex_texture_image_units: u32,
pub max_vertex_uniform_vectors: u32,
}
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)]
pub struct GLFormats {
pub texture_format: u32,
pub texture_type: u32,
}