-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bevy_webgl2 render backend #613
Conversation
Wow you've been busy 😄 |
let mut layouts = { | ||
let mut layouts = vec![vertex_spirv.reflect_layout(bevy_conventions).unwrap()]; | ||
log::info!("vertex shader layout: {:#?}", layouts[0]); | ||
if let Some(ref fragment_spirv) = fragment_spirv { | ||
layouts.push(fragment_spirv.reflect_layout(bevy_conventions).unwrap()); | ||
log::info!("fragment shader layout: {:#?}", layouts[1]); | ||
}; | ||
|
||
layouts | ||
}; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just reverted all changes in this file
pub fn fmt_as_output_edge( | ||
&self, | ||
f: &mut std::fmt::Formatter<'_>, | ||
nodes: &HashMap<NodeId, NodeState>, | ||
) -> std::fmt::Result { | ||
match self { | ||
Edge::SlotEdge { input_index, output_index, .. } => write!(f, " SlotEdge(in #{}, out #{}", input_index, output_index)?, | ||
Edge::NodeEdge { .. } => write!(f, " NodeEdge(")?, | ||
} | ||
let node = nodes.get(&self.get_input_node()).unwrap(); | ||
write!(f, "{:?})", node) | ||
} | ||
|
||
pub fn fmt_as_input_edge( | ||
&self, | ||
f: &mut std::fmt::Formatter<'_>, | ||
nodes: &HashMap<NodeId, NodeState>, | ||
) -> std::fmt::Result { | ||
match self { | ||
Edge::SlotEdge { input_index, output_index, .. } => write!(f, " SlotEdge( in #{}, out #{}, ", input_index, output_index)?, | ||
Edge::NodeEdge {..} => write!(f, " NodeEdge(")?, | ||
} | ||
let node = nodes.get(&self.get_output_node()).unwrap(); | ||
write!(f, "{:?})", node) | ||
} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
writeln!(f, ""); | ||
write!(f, " out edges:"); | ||
for edge in &node.edges.output_edges { | ||
edge.fmt_as_output_edge(f, &self.nodes); | ||
}; | ||
writeln!(f, ""); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
let cnt = visible_entities.iter().count(); | ||
log::info!("visible entities:{:?}", cnt); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
f9beb95
to
32b8ad9
Compare
Can this also function as a native OpenGL backend? Afaik, the only difference is wasm bindings. Something like glow can be used to support many platforms at once Amazing work btw 💯 |
Definitely. I'm finishing cleanup of this PR (a lot of mess landed here while exploring how everything works), after that I'll try to explore glow. Thanks! |
7e4f88b
to
89c04ca
Compare
cb3fc9a
to
05bf8ae
Compare
Hey, I just want to say how glad I am that somebody is working on this! Web and OpenGL support are something I would really like to see in Bevy! 😃 Also, I can vouch for |
caf87d9
to
bbdd412
Compare
auto-reflect DynamicBindings
Ah, so cool! |
Closing as bevy_webgl2 is now available as external plugin: https://github.com/mrk-its/bevy_webgl2 |
No description provided.