Skip to content
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

Support Depth #66

Merged
merged 6 commits into from
Feb 20, 2018
Merged

Support Depth #66

merged 6 commits into from
Feb 20, 2018

Conversation

dati91
Copy link
Member

@dati91 dati91 commented Feb 19, 2018

No description provided.

@dati91 dati91 requested a review from zakorgy February 19, 2018 15:57
@dati91 dati91 self-assigned this Feb 19, 2018
@@ -218,8 +218,8 @@ impl<T: RenderTarget> RenderTargetList<T> {
assert_eq!(t.get_render_target_layer_count(), self.targets.len());
assert_eq!(t.get_layer_count() as usize, self.targets.len());
//TODO use this
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: remove this line

@dati91 dati91 mentioned this pull request Feb 19, 2018
}

impl<B: hal::Backend> Depthbuffer<B> {
pub fn new(device: &B::Device, memory_types: &[hal::MemoryType], pixel_width: u16, pixel_height: u16, depth_format: hal::format::Format) -> Self {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this parameter list to multiple lines.

}

impl<B: hal::Backend> Framebuffer<B> {
pub fn new(device: &B::Device, texture: &Texture, image: &Image<B>, layer_index: u16, render_pass: &B::RenderPass) -> Self {
pub fn new(device: &B::Device, texture: &Texture, image: &Image<B>, layer_index: u16, render_pass: &(B::RenderPass, B::RenderPass), rbo: RBOId, depth: Option<&B::ImageView>) -> Self {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this parameter list to multiple lines.

let pipelines_descriptors = blend_states.iter().map(|blend_state| {
let pipelines_descriptors = pipeline_states.iter().map(|&(blend_state, depth_test)| {
let sp = if depth_test == DepthTest::Off {
subpass
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could construct the required SubPass here like:

let sp = SubPass {
    index: 0,
    main_pass: if depth_test == DepthTest::Off {&render_pass.0} else {&render_pass.1},
}

@zakorgy zakorgy merged commit 6a7be0d into szeged:master Feb 20, 2018
@dati91 dati91 mentioned this pull request Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants