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

Remove screen size dependency #64

Merged
merged 7 commits into from
Apr 30, 2019

Conversation

hecrj
Copy link
Contributor

@hecrj hecrj commented Apr 30, 2019

Fixes #63.

This removes the screen size dependency as I described in #63. These are just the basic changes to get the gfx_glyph paragraph example to work. All the other examples probably need to be adapted.

I personally think the code becomes much simpler. Let me know what you think and how to proceed.

@hecrj hecrj force-pushed the remove-target-size-dependency branch from a756b08 to 6e0491d Compare April 30, 2019 13:05
gfx-glyph/src/shader/vert.glsl Outdated Show resolved Hide resolved
@alexheretic
Copy link
Owner

Thanks I think this looks promising. I made a version without the invert-y stuff to see if it would work and it seems fine. I also adapted the opengl example.

The pre_positioned example is now broken for resizing, previously the screen dimension change would trigger a vertex re-calc, but I'm not sure why this is needed now...

gfx render target clones don't update resolutions
@alexheretic
Copy link
Owner

Ok cool I figured out why pre_positioned broke. gfx render target is mostly internally Arcs except the dimension, so when you clone it and update the original dimensions it won't update the clones.

So in this example the pipe render target had wrong dimensions after resizing.

@alexheretic
Copy link
Owner

Ok this looks good to me. Can you check I haven't screwed up your changes too much?

I'll test this with my usages and double check everything is fine.

@alexheretic alexheretic merged commit a5d2218 into alexheretic:master Apr 30, 2019
@alexheretic
Copy link
Owner

Thanks @hecrj! This is a nice improvement.

@hecrj hecrj changed the title WIP: Remove screen size dependency Remove screen size dependency Apr 30, 2019
@hecrj
Copy link
Contributor Author

hecrj commented Apr 30, 2019

Looks good to me! I have integrated the changes with wgpu_glyph locally and it's all working well.

Thank you for your fast response!

@hecrj hecrj mentioned this pull request Apr 30, 2019
3 tasks
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.

Remove screen dimensions dependency
2 participants