aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorAlejandro Marzini2010-07-26 06:58:33 +0000
committerAlejandro Marzini2010-07-26 06:58:33 +0000
commit141e10184181abcf169f59318179d92ec2e65597 (patch)
tree3a218b2cfa799d6b7d9003b275f295c98dbf4dbf /backends/graphics/opengl
parent738a9e78d8e0c2fc096006fd38d66ac743cb7a3d (diff)
downloadscummvm-rg350-141e10184181abcf169f59318179d92ec2e65597.tar.gz
scummvm-rg350-141e10184181abcf169f59318179d92ec2e65597.tar.bz2
scummvm-rg350-141e10184181abcf169f59318179d92ec2e65597.zip
Formatted spaces.
svn-id: r51300
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/glerrorcheck.cpp12
-rw-r--r--backends/graphics/opengl/gltexture.cpp10
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp18
-rw-r--r--backends/graphics/opengl/opengl-graphics.h4
4 files changed, 22 insertions, 22 deletions
diff --git a/backends/graphics/opengl/glerrorcheck.cpp b/backends/graphics/opengl/glerrorcheck.cpp
index 726147a66b..ee177f0ac5 100644
--- a/backends/graphics/opengl/glerrorcheck.cpp
+++ b/backends/graphics/opengl/glerrorcheck.cpp
@@ -47,12 +47,12 @@
static const char *getGlErrStr(GLenum error) {
switch (error) {
- case GL_NO_ERROR: return "GL_NO_ERROR";
- case GL_INVALID_ENUM: return "GL_INVALID_ENUM";
- case GL_INVALID_OPERATION: return "GL_INVALID_OPERATION";
- case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW";
- case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW";
- case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY";
+ case GL_NO_ERROR: return "GL_NO_ERROR";
+ case GL_INVALID_ENUM: return "GL_INVALID_ENUM";
+ case GL_INVALID_OPERATION: return "GL_INVALID_OPERATION";
+ case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW";
+ case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW";
+ case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY";
}
static char buf[40];
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index 188386d0ab..679538585f 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -129,7 +129,7 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {
// Allocate room for the texture
glTexImage2D(GL_TEXTURE_2D, 0, _glFormat,
- _textureWidth, _textureHeight, 0, _glFormat, _glType, NULL); CHECK_GL_ERROR();
+ _textureWidth, _textureHeight, 0, _glFormat, _glType, NULL); CHECK_GL_ERROR();
_refresh = false;
}
@@ -171,10 +171,10 @@ void GLTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
// Calculate the screen rect where the texture will be drawn
const GLshort vertices[] = {
- x, y,
- x + w, y,
- x, y + h,
- x + w, y + h,
+ x, y,
+ x + w, y,
+ x, y + h,
+ x + w, y + h,
};
glVertexPointer(2, GL_SHORT, 0, vertices); CHECK_GL_ERROR();
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 23de9db59e..58ca7f09ce 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -267,7 +267,7 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() {
_videoMode.aspectRatioCorrection == _oldVideoMode.aspectRatioCorrection &&
_videoMode.mode == _oldVideoMode.mode &&
_videoMode.screenWidth == _oldVideoMode.screenWidth &&
- _videoMode.screenHeight == _oldVideoMode.screenHeight) {
+ _videoMode.screenHeight == _oldVideoMode.screenHeight) {
_oldVideoMode.setup = false;
}
@@ -383,9 +383,9 @@ void OpenGLGraphicsManager::fillScreen(uint32 col) {
}
} else if (_screenFormat.bytesPerPixel == 3) {
uint8 *pixels = (uint8 *)_screenData.pixels;
- byte r = (col >> 16) & 0xFF;
- byte g = (col >> 8) & 0xFF;
- byte b = col & 0xFF;
+ byte r = (col >> 16) & 0xFF;
+ byte g = (col >> 8) & 0xFF;
+ byte b = col & 0xFF;
for (int i = 0; i < _screenData.w * _screenData.h; i++) {
pixels[0] = r;
pixels[1] = g;
@@ -823,23 +823,23 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,
bpp = 4;
glFormat = GL_RGBA;
gltype = GL_UNSIGNED_BYTE;
- } else if (pixelFormat == Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0)) { // RGB888
+ } else if (pixelFormat == Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0)) { // RGB888
bpp = 3;
glFormat = GL_RGB;
gltype = GL_UNSIGNED_BYTE;
- } else if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)) { // RGB565
+ } else if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)) { // RGB565
bpp = 2;
glFormat = GL_RGB;
gltype = GL_UNSIGNED_SHORT_5_6_5;
- } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0)) { // RGB5551
+ } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0)) { // RGB5551
bpp = 2;
glFormat = GL_RGBA;
gltype = GL_UNSIGNED_SHORT_5_5_5_1;
- } else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)) { // RGBA4444
+ } else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)) { // RGBA4444
bpp = 2;
glFormat = GL_RGBA;
gltype = GL_UNSIGNED_SHORT_4_4_4_4;
- } else if (pixelFormat.bytesPerPixel == 1) { // CLUT8
+ } else if (pixelFormat.bytesPerPixel == 1) { // CLUT8
// If uses a palette, create texture as RGB888. The pixel data will be converted
// later.
bpp = 3;
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 2db232967b..73c812af5b 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -221,8 +221,8 @@ protected:
int16 vHotX, vHotY;
MousePos() : x(0), y(0), w(0), h(0), hotX(0), hotY(0),
- rW(0), rH(0), rHotX(0), rHotY(0), vW(0), vH(0),
- vHotX(0), vHotY(0) {}
+ rW(0), rH(0), rHotX(0), rHotY(0), vW(0), vH(0),
+ vHotX(0), vHotY(0) {}
};
GLTexture* _cursorTexture;