-
Notifications
You must be signed in to change notification settings - Fork 18
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
remove Bitmap class #70
Comments
There seems to be two uses for the Bitmap class. One of them is to store The other thing is to do source clipping on other Bitmap (I think, can't We should convert all of this to be just SDL_Surface, and use the source We should add a function to calculate the intersection of two SDL_Rect, |
Stéphane expressed his disagreement with this in person, yesterday. I'm not 100% sure I clarified my own feelings, which is that maybe it'd be okay to have a wrapper class Since it looks like most place that has a Bitmap to do this also has a pointer to When I mentioned the refcounting that SDL_Surface could do, Rémi pointed out that |
Update on this: SDL2 works best if you can put your pixel data in "textures", that you pretty much can't really access directly (you can lock them, but if you do, that overwrites the entire texture, as it does not download the existing texture from video memory, and will do a full upload afterward). So the whole business of having pointers inside video memory and such, that's just not really the best (whether we wrap SDL or not), and things like Video_bitmap and Bitmap are all about the pixel access... At the moment, the SDL2 port (currently at https://github.com/pphaneuf/quadra/tree/sdl2 but watch out, this is unstable, I rebase it often!) uses a single texture for the whole screen, and does a full update on every frame (this doesn't horribly suck probably because 640x480 is nothing nowadays), but it'd be neat if we could pre-render all the tetrominos (in each orientation) in a texture, ahead of time, then use the fast texture blitting to put them on screen. Anyway... :-) |
Oh, there's a SDL_IntersectRect in SDL2 now, too, BTW. |
No description provided.
The text was updated successfully, but these errors were encountered: