[AD] Removing al_set_new_display_format |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
As discussed on IRC, this function is redundant now that we have al_set_new_display_option.
On some ports, neither this function nor the al_set_new_display_option flags of RED_SIZE
GREEN_SIZE RED_SHIFT etc are guaranteed to work.
The only time you care about the backbuffer format is when you plan to lock it. On
OpenGL you can return any format in the locked buffer that the user requests. D3D
will normally return a buffer only in the exact backbuffer format.
What was discussed is having al_lock_bitmap(_region) take a pixel format parameter,
and then it would return a buffer in that format. Under OpenGL, not much changes.
Under D3D the buffer would be converted into the users desired format. This makes
dealing with locked buffers much easier, as you would only have to support 1
pixel format of your choosing.
So to summarize:
I think we should remove al_set_new_display_format and have al_set_new_display_option
take it's place (for the rare occasion where you need to specify an exact pixel format).
Then we would change the bitmap locking functions to take a pixel format argument,
and the locked.data pointer would always contain data in that format.
What does everyone else think?
Trent :{)>