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

Multiple TextureAtlas per SymbolBucket #301

Closed
Longri opened this issue Feb 23, 2017 · 14 comments
Closed

Multiple TextureAtlas per SymbolBucket #301

Longri opened this issue Feb 23, 2017 · 14 comments
Labels
Milestone

Comments

@Longri
Copy link

Longri commented Feb 23, 2017

I found a bug while drawing with a TextureAtlas.
If an Atlas has several Textures, the correct Texture is not always selected when drawing. The region is drawn correctly, but from a false texture.

Or otherwise described, when a symbol is drawn, the correct region is drawn, but from the wrong Texture.

So here the Texture binding does not seem to work properly.

I will try to find the bug. I have written a test and am looking.

bildschirmfoto 2017-02-23 um 19 05 16
bildschirmfoto 2017-02-23 um 19 04 53

@devemux86
Copy link
Collaborator

Some issue in latest texture atlas pull request code?

@Longri
Copy link
Author

Longri commented Feb 23, 2017

No, not at my code. Is deeper. I will check the buckets and the gl texture binding.

@Longri
Copy link
Author

Longri commented Feb 24, 2017

The problem is Android and Mac desktop. On Windows I have no problems.
This means, however, that I can only look for the error on the weekend when I am sitting on the Mac!

@devemux86
Copy link
Collaborator

We need a test sample anyway in order to check what actually happens, have not seen any texture problems so far (besides those in issues list).

If it involves changes in VTM core we should probably proceed on VTM 0.7.0 release as with SVG themes less users actually use a texture atlas.
WDYT

@Longri
Copy link
Author

Longri commented Feb 24, 2017

My Testcase:

AtlasMultiTextureTest.zip

Put into Playground, start, zoom in, and move map! Texture will change with move!
Maybe is SymbolBucket line 85 : /* FIXME This work only with one TextureAtlas per SymbolBucket */

On Windows I have the Problem not evry map move, but somtime!
I will loog.

@Longri
Copy link
Author

Longri commented Feb 24, 2017

If it involves changes in VTM core we should probably proceed on VTM 0.7.0 release as with SVG themes less users actually use a texture atlas.

👍

@devemux86
Copy link
Collaborator

FIXME This work only with one TextureAtlas per SymbolBucket

Possibly and that's a quite old comment.

BTW that's a nice test case, you could post a PR to include it for testing. 🙂

Tested on Linux, things can get worse on pan / zoom:
atlas

@devemux86 devemux86 added the bug label Feb 24, 2017
@Longri
Copy link
Author

Longri commented Feb 24, 2017

BTW that's a nice test case, you could post a PR to include it for testing. 🙂

Yes I will upload it with a PR!
But only if I have extensively tested the changes!
Because I think I have fixed the bug, but I want to make sure that the changes have no side effect!

@devemux86
Copy link
Collaborator

But only if I have extensively tested the changes!
Because I think I have fixed the bug, but I want to make sure that the changes have no side effect!

👍

@Longri
Copy link
Author

Longri commented Feb 24, 2017

Too early.
When I move the map, the textures are drawn correctly and changed!
But when I change a symbol with a click, the textures are thrown again. Probably I have to re-initialize all items with a symbol change !?

I'll stay!

@devemux86
Copy link
Collaborator

Probably I have to re-initialize all items with a symbol change !?

You mean with each tap? That would not be good for memory / performance.

I've not debugged further, but is it indeed the problem with the >1 created texture atlases?
Could you increase the coordinates step in the 2 for loops so that only 1 texture atlas is created and then see if the problem persists?

@Longri
Copy link
Author

Longri commented Feb 24, 2017

No not at every touch event!

Only if I click on a symbol and then with item.setMarker () a Symbol exchange! But that only makes problems if the old marker is not in the same atlas as the new marker!

@Longri
Copy link
Author

Longri commented Feb 24, 2017

I've not debugged further, but is it indeed the problem with the >1 created texture atlases?
Could you increase the coordinates step in the 2 for loops so that only 1 texture atlas is created and then see if the problem persists?

ONLY with more then one TextureAtlas!

@devemux86
Copy link
Collaborator

Fixed via #303.

@devemux86 devemux86 changed the title Wrong Texture binding Multiple TextureAtlas per SymbolBucket Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants