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

Issue with using .dds files which has not power-of-two sides. Scenarios: sprite(2d), sprite_grid(2d), texture(3d), texture_grid(3d) #78

Closed
Yuriy-Leonov opened this issue Oct 13, 2019 · 6 comments

Comments

@Yuriy-Leonov
Copy link

Yuriy-Leonov commented Oct 13, 2019

I've updated repository with new description of issue and provided examples.

pyglet version is 1.4.5

Following text is copied from README in repository:

There are two files(300px*250px):

source example.png:

pyglet window

and generated example.dds:

pyglet window

They look similar in GIMP(or other editors)

But is they are loaded in pyglet - following picture could be seen(draw_dds_not_power_of_two.py):

pyglet window

And here is example with using such files in 3d render(draw_3d.py):

pyglet window

Related folder - creating_sprites

Related files:

draw_dds_not_power_of_two.py

draw_3d.py

It describes 4 scenarios of using:

  • as 2d sprite (low row on 3rd screenshot)
  • as 2d sprite grid (up row on 3rd screenshot)
  • as texture in 3d (low row on 4th screenshot)
  • as texture grid in 3d (up row on 4th screenshot)

Expected:
Left and right sides of 3rd and 4th pictures look same :)

PS: I would be glad to provide more details if required.

@benmoran56
Copy link
Member

Thanks for the detailed examples, and forgive the delay. I'll have a look at this soon.

@benmoran56
Copy link
Member

I've done some work on this, and think I've figured out the issue. I need a little more time to test, but I may have a fix soon.

@benmoran56
Copy link
Member

This should be fixed in pyglet-1.4-maintenance. Could you give it a try, and let me know if it works? If so I'll get it into the next release:

pip install --upgrade --user git+https://github.com/pyglet/pyglet.git@pyglet-1.4-maintenance

@Yuriy-Leonov
Copy link
Author

will check this evening

@Yuriy-Leonov
Copy link
Author

Yuriy-Leonov commented Oct 28, 2019

Confirm:

3D
pyglet window

2D
pyglet window

Installing:

pip install --upgrade  git+https://github.com/pyglet/pyglet.git@pyglet-1.4-maintenance
  Collecting git+https://github.com/pyglet/pyglet.git@pyglet-1.4-maintenance
  Cloning https://github.com/pyglet/pyglet.git (to revision pyglet-1.4-maintenance) to /tmp/pip-req-build-8w3hreon
  Running command git clone -q https://github.com/pyglet/pyglet.git /tmp/pip-req-build-8w3hreon
  Running command git checkout -b pyglet-1.4-maintenance --track origin/pyglet-1.4-maintenance
  Switched to a new branch 'pyglet-1.4-maintenance'
  Branch 'pyglet-1.4-maintenance' set up to track remote branch 'pyglet-1.4-maintenance' from 'origin'.
Installing collected packages: pyglet
  Running setup.py install for pyglet ... done
Successfully installed pyglet-1.4.7

Contains following commit - b71ecba

Current issue is solved.

@benmoran56 Thank you for such solution.

@benmoran56
Copy link
Member

Great!

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

No branches or pull requests

2 participants