Compare commits
No commits in common. "d49fbd6f6ed1c5ae154e42bacfb06b3053170ab8" and "0c2c73f5ece19384587caf938b418d5e35a788b2" have entirely different histories.
d49fbd6f6e
...
0c2c73f5ec
2 changed files with 4 additions and 18 deletions
|
@ -19,8 +19,6 @@ impl BackgroundGenerator {
|
|||
color: [f32; 4],
|
||||
image_infos: [(u32, u32); N],
|
||||
) -> Result<[Arc<Image>; N]> {
|
||||
let max_supported_sample_count = device.max_supported_sample_count(VK_SAMPLE_COUNT_16_BIT);
|
||||
|
||||
let vertex_shader = ShaderModule::from_slice(
|
||||
device.clone(),
|
||||
include_bytes!("generator.vert.spv"),
|
||||
|
@ -50,17 +48,7 @@ impl BackgroundGenerator {
|
|||
let render_target = RenderTarget::builder()
|
||||
.add_sub_pass(
|
||||
SubPass::builder(image.width(), image.height())
|
||||
.add_target_info(CustomTarget {
|
||||
usage: VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT.into(),
|
||||
format: image.vk_format(),
|
||||
clear_on_load: true,
|
||||
store_on_save: true,
|
||||
attach_sampler: false,
|
||||
use_as_input: false,
|
||||
clear_value: ClearValue::Color([0.0, 0.0, 0.0, 0.0]),
|
||||
})
|
||||
.set_sample_count(max_supported_sample_count)
|
||||
.add_resolve_targets(vec![image.clone()])
|
||||
.set_prepared_targets(&[image.clone()], 0, [0.0, 0.0, 0.0, 0.0], true)
|
||||
.build(&device, &queue)?,
|
||||
)
|
||||
.build(&device)?;
|
||||
|
@ -114,7 +102,7 @@ impl BackgroundGenerator {
|
|||
.default_depth_stencil(false, false)
|
||||
.default_color_blend(vec![VkPipelineColorBlendAttachmentState::default()])
|
||||
.default_rasterization(VK_CULL_MODE_NONE, VK_FRONT_FACE_COUNTER_CLOCKWISE)
|
||||
.default_multisample(max_supported_sample_count)
|
||||
.default_multisample(VK_SAMPLE_COUNT_1_BIT)
|
||||
.add_viewport(viewport)
|
||||
.add_scissor(scissor)
|
||||
.build(
|
||||
|
|
|
@ -149,7 +149,7 @@ impl LeaderBoardEntry {
|
|||
match self.behind {
|
||||
BehindLeader::Time(time_behind) => {
|
||||
// check if we are leader
|
||||
if time_behind <= 0.0 {
|
||||
if time_behind == 0.0 {
|
||||
self.time_label.set_text("---")?;
|
||||
} else {
|
||||
let text = if time_behind > 60.0 {
|
||||
|
@ -221,9 +221,7 @@ impl LeaderBoardEntry {
|
|||
}
|
||||
|
||||
pub fn force_display_behind_next(&mut self) -> Result<()> {
|
||||
let text = if self.time_behind_next <= 0.0 {
|
||||
"---".to_string()
|
||||
} else if self.time_behind_next > 60.0 {
|
||||
let text = if self.time_behind_next > 60.0 {
|
||||
let full_minutes = (self.time_behind_next / 60.0).floor();
|
||||
let remainder = self.time_behind_next - (full_minutes * 60.0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue