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

Create proper draw chain that will draw the objects in the same order as they called #38

Open
meirtsvi opened this issue Dec 31, 2011 · 0 comments

Comments

@meirtsvi
Copy link
Owner

In the XNA implementation I wanted to get results fast. This came on the account of drawing objects in hard-coded order rather than the order which they have been called from C code.
I first draw all the polygons, then the bitmaps and then the text. This can cause to weird effects if the intention was to draw the text and only then the polygon.
I'm using 3 arrays to hold the polygons, bitmaps and texts. I suggest keeping one array and inside the OnDraw function add 'switch' clause that check the object type and draws it accordingly.

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

1 participant