Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kayak UI
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy Forks
Kayak UI
Commits
9fa1f904
Commit
9fa1f904
authored
3 years ago
by
StarArawn
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug with image rendering..
parent
4d9e74db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bevy_kayak_ui/src/render/unified/pipeline.rs
+28
-31
28 additions, 31 deletions
bevy_kayak_ui/src/render/unified/pipeline.rs
with
28 additions
and
31 deletions
bevy_kayak_ui/src/render/unified/pipeline.rs
+
28
−
31
View file @
9fa1f904
...
@@ -499,28 +499,29 @@ pub fn queue_quads(
...
@@ -499,28 +499,29 @@ pub fn queue_quads(
for
mut
transparent_phase
in
views
.iter_mut
()
{
for
mut
transparent_phase
in
views
.iter_mut
()
{
for
(
entity
,
quad
)
in
extracted_sprites
.iter_mut
()
{
for
(
entity
,
quad
)
in
extracted_sprites
.iter_mut
()
{
if
let
Some
(
image_handle
)
=
quad
.image
.as_ref
()
{
if
let
Some
(
image_handle
)
=
quad
.image
.as_ref
()
{
image_bind_groups
if
let
Some
(
gpu_image
)
=
gpu_images
.get
(
&
image_handle
)
{
.values
image_bind_groups
.entry
(
image_handle
.clone_weak
())
.values
.or_insert_with
(||
{
.entry
(
image_handle
.clone_weak
())
let
gpu_image
=
gpu_images
.get
(
&
image_handle
)
.unwrap
();
.or_insert_with
(||
{
render_device
.create_bind_group
(
&
BindGroupDescriptor
{
render_device
.create_bind_group
(
&
BindGroupDescriptor
{
entries
:
&
[
entries
:
&
[
BindGroupEntry
{
BindGroupEntry
{
binding
:
0
,
binding
:
0
,
resource
:
BindingResource
::
TextureView
(
resource
:
BindingResource
::
TextureView
(
&
gpu_image
.texture_view
,
&
gpu_image
.texture_view
,
),
),
},
},
BindGroupEntry
{
BindGroupEntry
{
binding
:
1
,
binding
:
1
,
resource
:
BindingResource
::
Sampler
(
&
gpu_image
.sampler
),
resource
:
BindingResource
::
Sampler
(
&
gpu_image
.sampler
),
},
},
],
],
label
:
Some
(
"ui_image_bind_group"
),
label
:
Some
(
"ui_image_bind_group"
),
layout
:
&
unified_pipeline
.image_layout
,
layout
:
&
unified_pipeline
.image_layout
,
})
})
});
});
}
}
}
transparent_phase
.add
(
TransparentUI
{
transparent_phase
.add
(
TransparentUI
{
draw_function
:
draw_quad
,
draw_function
:
draw_quad
,
...
@@ -603,15 +604,11 @@ impl Draw<TransparentUI> for DrawUI {
...
@@ -603,15 +604,11 @@ impl Draw<TransparentUI> for DrawUI {
}
}
if
let
Some
(
image_handle
)
=
extracted_quad
.image
.as_ref
()
{
if
let
Some
(
image_handle
)
=
extracted_quad
.image
.as_ref
()
{
pass
.set_bind_group
(
if
let
Some
(
bind_group
)
=
image_bind_groups
.into_inner
()
.values
.get
(
image_handle
)
{
3
,
pass
.set_bind_group
(
3
,
&
bind_group
,
&
[]);
&
image_bind_groups
}
else
{
.into_inner
()
pass
.set_bind_group
(
3
,
&
unified_pipeline
.default_image
.1
,
&
[]);
.values
}
.get
(
image_handle
)
.unwrap
(),
&
[],
);
}
else
{
}
else
{
pass
.set_bind_group
(
3
,
&
unified_pipeline
.default_image
.1
,
&
[]);
pass
.set_bind_group
(
3
,
&
unified_pipeline
.default_image
.1
,
&
[]);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment