-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature pixbuf #46
base: develop
Are you sure you want to change the base?
Feature pixbuf #46
Conversation
Pixbuf has been added as a new data type. This massively increases the speed of drawing individual pixels.
This commit fixes some logic and code errors caused by the rebase from v4_backend to devel
Just a note, the pascal interface for this hasn't been written yet. For some strange reason, I keep getting fatal internal errors when trying to build swingame. |
We are in the process of re-writing this as SplashKit at the moment -- did you want to try incorporating your code into that repo? https://github.com/splashkit/splashkit |
Ok, thanks. I'll have a go at it. In the mean time, have you had a look at the other pull request? Because it's all low level modifications to an already existing data type, there is no need to modify the Pascal side of things. |
I had a quick look, but hadn't realised the key difference :) Which approach would you recommend? At the moment the front end in SplashKit could go either way. I'm happy to take suggestions and move forward with just one of these. |
I personally believe that modified bitmaps would be better moving forward. TL;DR They'd result in much less code duplication in the long term and simplify the decision of what type to use for students...because there's only one choice. And are also slightly faster than pixbufs at present. The biggest difference between the two methods is that bitmaps are able to cache any changes in gpu using textures. That could be added to the pixbuf method as well, but it would end up being almost identical to a bitmap, just with more restrictive purposes (can't draw shapes to it) and lots of duplicate code. The bitmap method already has texture caching, so when the contents of a bitmap is rarely changed due to pixel drawing. It will be much faster drawing bitmaps to screens or other bitmaps than with pixbufs. This could be done for pixbufs as well, but it is not a trivial addition, and there will be lots of duplicated code between bitmaps and pixbufs. On top of that, one less data type is much more convenient to students, who won't have to decide when to use a regular bitmap vs a pixbuf. |
Ok, lets go with that version then. Conversion to SplashKit should be ok, as it is mostly the same in the backend -- but it will need a little bit of work. |
This pull request is in reference to issue #36