I recently started doing some work with Java2D again, now that we have the possibility of drawing acclerated using the d3d & ogl pipeline.
I started to build a little wrapper that handles common operations like setting the backbuffer, fullscreen/windowed mode, color depth etc.
But I’m wondering how ColorMode’s /ColorSpace’s are used under the hood in Java2D and how they affect performance.
Just to give an extreme example:
Suppose my display has a color depth of 32bpp. I load some 24bit images (sprites) which I blit to an offscreen image which has a color depth of 16bpp, then I blit this 16bpp image to my 32bpp screen. I guess this means that the pixels have to be converted each blit (for the copy to the offscreen image & the blit to screen)? Would it be better to get the current display depth and set the colormodel for all images i use to that colormodel/depth?
Thanks!
Martijn