Skip to content

Commit

Permalink
Use surfman that has glow instead of GL_gen
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Nov 21, 2024
1 parent 84c3022 commit 5d2b91d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions webxr-api/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use euclid::Rect;
use euclid::Size2D;

use std::fmt::Debug;
use std::num::NonZero;
use std::num::NonZeroU32;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;

Expand Down Expand Up @@ -288,9 +290,8 @@ pub struct SubImages {
#[derive(Clone, Debug)]
#[cfg_attr(feature = "ipc", derive(Deserialize, Serialize))]
pub struct SubImage {
pub color_texture: u32,
// TODO: make this Option<NonZeroU32>
pub depth_stencil_texture: Option<u32>,
pub color_texture: Option<NonZeroU32>,
pub depth_stencil_texture: Option<NonZeroU32>,
pub texture_array_index: Option<u32>,
pub viewport: Rect<i32, Viewport>,
}
2 changes: 1 addition & 1 deletion webxr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ log = "0.4.6"
openxr = { version = "0.19", optional = true }
serde = { version = "1.0", optional = true }
glow = "0.16"
surfman = { git = "https://github.com/servo/surfman", rev = "c8d6b4b65aeab739ee7651602e29c8d58ceee123", features = [
surfman = { git = "https://github.com/sagudev/surfman", branch = "no_gl_gen", features = [
"chains",
] }

Expand Down
10 changes: 5 additions & 5 deletions webxr/surfman_layer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
let texture_array_index = None;
let origin = Point2D::new(0, 0);
let sub_image = Some(SubImage {
color_texture,
depth_stencil_texture: depth_stencil_texture.map(|nt| nt.0.get()),
color_texture: color_texture.map(|nt| nt.0),
depth_stencil_texture: depth_stencil_texture.map(|nt| nt.0),
texture_array_index,
viewport: Rect::new(origin, surface_size),
});
Expand All @@ -173,8 +173,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
.viewports
.iter()
.map(|&viewport| SubImage {
color_texture,
depth_stencil_texture: depth_stencil_texture.map(|texture| texture.0.get()),
color_texture: color_texture.map(|nt| nt.0),
depth_stencil_texture: depth_stencil_texture.map(|texture| texture.0),
texture_array_index,
viewport,
})
Expand All @@ -185,7 +185,7 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
contexts,
context_id,
layer_id,
NonZeroU32::new(color_texture).map(gl::NativeTexture),
color_texture,
color_target,
depth_stencil_texture,
);
Expand Down

0 comments on commit 5d2b91d

Please sign in to comment.