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

Fix order of arguments to glPolygonOffset. #3783

Merged
merged 2 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Bottom level categories:

### Bug Fixes

- Fix order of arguments to glPolygonOffset by @komadori in [#3783](https://github.com/gfx-rs/wgpu/pull/3783).

#### General

- Fix crash on dropping `wgpu::CommandBuffer`. By @wumpf in [#3726](https://github.com/gfx-rs/wgpu/pull/3726).
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ impl super::Queue {
C::SetDepthBias(bias) => {
if bias.is_enabled() {
unsafe { gl.enable(glow::POLYGON_OFFSET_FILL) };
unsafe { gl.polygon_offset(bias.constant as f32, bias.slope_scale) };
unsafe { gl.polygon_offset(bias.slope_scale, bias.constant as f32) };
} else {
unsafe { gl.disable(glow::POLYGON_OFFSET_FILL) };
}
Expand Down