OPENGL: Clean up the overlay pixel format code
This commit is contained in:
parent
9853d26344
commit
d645bbcefd
3 changed files with 6 additions and 7 deletions
|
@ -155,11 +155,7 @@ void OpenGLSdlGraphicsManager::setupScreen(uint gameWidth, uint gameHeight, bool
|
|||
initializeOpenGLContext();
|
||||
_surfaceRenderer = OpenGL::createBestSurfaceRenderer();
|
||||
|
||||
#ifdef SCUMM_BIG_ENDIAN
|
||||
_overlayFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
|
||||
#else
|
||||
_overlayFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
|
||||
#endif
|
||||
_overlayFormat = OpenGL::Texture::getRGBAPixelFormat();
|
||||
_overlayScreen = new OpenGL::TiledSurface(effectiveWidth, effectiveHeight, _overlayFormat);
|
||||
|
||||
_overlayWidth = effectiveWidth;
|
||||
|
|
|
@ -42,7 +42,7 @@ static T nextHigher2(T k) {
|
|||
return k + 1;
|
||||
}
|
||||
|
||||
static const Graphics::PixelFormat getRGBAPixelFormat() {
|
||||
const Graphics::PixelFormat Texture::getRGBAPixelFormat() {
|
||||
#ifdef SCUMM_BIG_ENDIAN
|
||||
return Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
|
||||
#else
|
||||
|
@ -50,7 +50,7 @@ static const Graphics::PixelFormat getRGBAPixelFormat() {
|
|||
#endif
|
||||
}
|
||||
|
||||
static const Graphics::PixelFormat get565PixelFormat() {
|
||||
const Graphics::PixelFormat Texture::get565PixelFormat() {
|
||||
return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ public:
|
|||
uint getTexWidth() const { return _texWidth; }
|
||||
uint getTexHeight() const { return _texHeight; }
|
||||
|
||||
static const Graphics::PixelFormat getRGBAPixelFormat();
|
||||
static const Graphics::PixelFormat get565PixelFormat();
|
||||
|
||||
protected:
|
||||
bool _managedTexture;
|
||||
GLuint _texture;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue