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

TwoColorPolygonBatch implements Batch interface, updated gdx to 1.9.8 #1057

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

piotr-j
Copy link
Contributor

@piotr-j piotr-j commented Jan 4, 2018

TwoColorPolygonBatch now implements Batch interface with support for dark tint for all draw types.
Sprite vertices are transformed when submitted.
Theres one issue, SkeletonRenderer#draw(Batch) and SkeletonRenderer#draw(TwoColorPolygonBatch) are now ambiguous. Im not certain whats the best way to solve that.

I had to update gdx for separate blend functions.

See #1043

@badlogic badlogic self-assigned this Jan 10, 2018
@badlogic badlogic merged commit a46b3d1 into EsotericSoftware:3.7-beta Jan 10, 2018
@badlogic
Copy link
Collaborator

Awesome, thanks! The ambigious draw methods aren't an issue really.

@piotr-j piotr-j deleted the 3.7-beta branch January 10, 2018 17:18
@piotr-j
Copy link
Contributor Author

piotr-j commented Jun 5, 2018

Looks like i didnt quite get it right, missed one corner case. Drawing text. BitmapFontCache uses TwoColorPolygonBatch#draw (Texture texture, float[] vertices, int offset, int count) and if theres more then 1 character it breaks the batch. Current solution cant be easily extended. Perhaps a flag for automatic conversion enabled by default?

Something like this might do the trick https://gist.github.com/piotr-j/669d77fc9b385d12a9a40c7258bc8b58

@badlogic
Copy link
Collaborator

badlogic commented Jun 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants