[Scummvm-git-logs] scummvm master -> d1d77f887e49710dd5cb107e2cd1f809568932bb
aquadran
noreply at scummvm.org
Mon Jan 10 00:21:56 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d1d77f887e BACKENDS3D: Moved Surfaces and Texture specific backend code to backends
Commit: d1d77f887e49710dd5cb107e2cd1f809568932bb
https://github.com/scummvm/scummvm/commit/d1d77f887e49710dd5cb107e2cd1f809568932bb
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-01-10T01:21:49+01:00
Commit Message:
BACKENDS3D: Moved Surfaces and Texture specific backend code to backends
Changed paths:
A backends/graphics3d/opengl/box_shaders.cpp
A backends/graphics3d/opengl/compat_shaders.cpp
A backends/graphics3d/opengl/control_shaders.cpp
A backends/graphics3d/opengl/framebuffer.cpp
A backends/graphics3d/opengl/framebuffer.h
A backends/graphics3d/opengl/surfacerenderer.cpp
A backends/graphics3d/opengl/surfacerenderer.h
A backends/graphics3d/opengl/texture.cpp
A backends/graphics3d/opengl/texture.h
A backends/graphics3d/opengl/tiledsurface.cpp
A backends/graphics3d/opengl/tiledsurface.h
R graphics/opengl/box_shaders.cpp
R graphics/opengl/compat_shaders.cpp
R graphics/opengl/control_shaders.cpp
R graphics/opengl/framebuffer.cpp
R graphics/opengl/framebuffer.h
R graphics/opengl/surfacerenderer.cpp
R graphics/opengl/surfacerenderer.h
R graphics/opengl/texture.cpp
R graphics/opengl/texture.h
R graphics/opengl/tiledsurface.cpp
R graphics/opengl/tiledsurface.h
backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
backends/module.mk
engines/wintermute/base/gfx/base_renderer3d.h
engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
graphics/module.mk
diff --git a/graphics/opengl/box_shaders.cpp b/backends/graphics3d/opengl/box_shaders.cpp
similarity index 100%
rename from graphics/opengl/box_shaders.cpp
rename to backends/graphics3d/opengl/box_shaders.cpp
diff --git a/graphics/opengl/compat_shaders.cpp b/backends/graphics3d/opengl/compat_shaders.cpp
similarity index 100%
rename from graphics/opengl/compat_shaders.cpp
rename to backends/graphics3d/opengl/compat_shaders.cpp
diff --git a/graphics/opengl/control_shaders.cpp b/backends/graphics3d/opengl/control_shaders.cpp
similarity index 100%
rename from graphics/opengl/control_shaders.cpp
rename to backends/graphics3d/opengl/control_shaders.cpp
diff --git a/graphics/opengl/framebuffer.cpp b/backends/graphics3d/opengl/framebuffer.cpp
similarity index 99%
rename from graphics/opengl/framebuffer.cpp
rename to backends/graphics3d/opengl/framebuffer.cpp
index 3c371f79500..38f4ec2c3e7 100644
--- a/graphics/opengl/framebuffer.cpp
+++ b/backends/graphics3d/opengl/framebuffer.cpp
@@ -24,7 +24,8 @@
#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(AMIGAOS) && !defined(__MORPHOS__)
-#include "graphics/opengl/framebuffer.h"
+#include "backends/graphics3d/opengl/framebuffer.h"
+
#include "graphics/opengl/context.h"
#ifdef USE_GLES2
diff --git a/graphics/opengl/framebuffer.h b/backends/graphics3d/opengl/framebuffer.h
similarity index 93%
rename from graphics/opengl/framebuffer.h
rename to backends/graphics3d/opengl/framebuffer.h
index d3a44bcc79c..4cd240adf97 100644
--- a/graphics/opengl/framebuffer.h
+++ b/backends/graphics3d/opengl/framebuffer.h
@@ -19,11 +19,12 @@
*
*/
-#ifndef GRAPHICS_OPENGL_FRAMEBUFFER_H
-#define GRAPHICS_OPENGL_FRAMEBUFFER_H
+#ifndef BACKENDS_GRAPHICS3D_OPENGL_FRAMEBUFFER_H
+#define BACKENDS_GRAPHICS3D_OPENGL_FRAMEBUFFER_H
#include "graphics/opengl/system_headers.h"
-#include "graphics/opengl/texture.h"
+
+#include "backends/graphics3d/opengl/texture.h"
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
diff --git a/graphics/opengl/surfacerenderer.cpp b/backends/graphics3d/opengl/surfacerenderer.cpp
similarity index 98%
rename from graphics/opengl/surfacerenderer.cpp
rename to backends/graphics3d/opengl/surfacerenderer.cpp
index 80d0f923e40..a0a29e18070 100644
--- a/graphics/opengl/surfacerenderer.cpp
+++ b/backends/graphics3d/opengl/surfacerenderer.cpp
@@ -23,10 +23,10 @@
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
-#include "graphics/opengl/surfacerenderer.h"
+#include "backends/graphics3d/opengl/surfacerenderer.h"
+#include "backends/graphics3d/opengl/texture.h"
#include "graphics/opengl/context.h"
-#include "graphics/opengl/texture.h"
#if defined(USE_OPENGL_SHADERS)
#include "graphics/opengl/shader.h"
diff --git a/graphics/opengl/surfacerenderer.h b/backends/graphics3d/opengl/surfacerenderer.h
similarity index 96%
rename from graphics/opengl/surfacerenderer.h
rename to backends/graphics3d/opengl/surfacerenderer.h
index 93ce736db14..889d4d9742d 100644
--- a/graphics/opengl/surfacerenderer.h
+++ b/backends/graphics3d/opengl/surfacerenderer.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef GRAPHICS_OPENGL_SURFACE_RENDERER_H
-#define GRAPHICS_OPENGL_SURFACE_RENDERER_H
+#ifndef BACKENDS_GRAPHICS3D_OPENGL_SURFACE_RENDERER_H
+#define BACKENDS_GRAPHICS3D_OPENGL_SURFACE_RENDERER_H
#include "math/rect2d.h"
diff --git a/graphics/opengl/texture.cpp b/backends/graphics3d/opengl/texture.cpp
similarity index 98%
rename from graphics/opengl/texture.cpp
rename to backends/graphics3d/opengl/texture.cpp
index a083f41dd0f..b74b960c76c 100644
--- a/graphics/opengl/texture.cpp
+++ b/backends/graphics3d/opengl/texture.cpp
@@ -23,7 +23,8 @@
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
-#include "graphics/opengl/texture.h"
+#include "backends/graphics3d/opengl/texture.h"
+
#include "graphics/opengl/context.h"
namespace OpenGL {
diff --git a/graphics/opengl/texture.h b/backends/graphics3d/opengl/texture.h
similarity index 95%
rename from graphics/opengl/texture.h
rename to backends/graphics3d/opengl/texture.h
index 2ab26227b35..110c8aeadda 100644
--- a/graphics/opengl/texture.h
+++ b/backends/graphics3d/opengl/texture.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef GRAPHICS_OPENGL_TEXTURE_H
-#define GRAPHICS_OPENGL_TEXTURE_H
+#ifndef BACKENDS_GRAPHICS3D_OPENGL_TEXTURE_H
+#define BACKENDS_GRAPHICS3D_OPENGL_TEXTURE_H
#include "graphics/opengl/system_headers.h"
diff --git a/graphics/opengl/tiledsurface.cpp b/backends/graphics3d/opengl/tiledsurface.cpp
similarity index 95%
rename from graphics/opengl/tiledsurface.cpp
rename to backends/graphics3d/opengl/tiledsurface.cpp
index 39a28605439..4289f4d3b29 100644
--- a/graphics/opengl/tiledsurface.cpp
+++ b/backends/graphics3d/opengl/tiledsurface.cpp
@@ -23,10 +23,9 @@
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
-#include "graphics/opengl/tiledsurface.h"
-
-#include "graphics/opengl/surfacerenderer.h"
-#include "graphics/opengl/texture.h"
+#include "backends/graphics3d/opengl/tiledsurface.h"
+#include "backends/graphics3d/opengl/surfacerenderer.h"
+#include "backends/graphics3d/opengl/texture.h"
namespace OpenGL {
diff --git a/graphics/opengl/tiledsurface.h b/backends/graphics3d/opengl/tiledsurface.h
similarity index 96%
rename from graphics/opengl/tiledsurface.h
rename to backends/graphics3d/opengl/tiledsurface.h
index 4b555a3bb0e..87788e456a8 100644
--- a/graphics/opengl/tiledsurface.h
+++ b/backends/graphics3d/opengl/tiledsurface.h
@@ -19,8 +19,8 @@
*
*/
-#ifndef GRAPHICS_OPENGL_TILED_SURFACE_H
-#define GRAPHICS_OPENGL_TILED_SURFACE_H
+#ifndef BACKENDS_GRAPHICS3D_OPENGL_TILED_SURFACE_H
+#define BACKENDS_GRAPHICS3D_OPENGL_TILED_SURFACE_H
#include "graphics/opengl/system_headers.h"
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index 854ae3542b9..89e7ebd47eb 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -24,18 +24,20 @@
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
#include "backends/graphics3d/openglsdl/openglsdl-graphics3d.h"
-
+#include "backends/graphics3d/opengl/surfacerenderer.h"
+#include "backends/graphics3d/opengl/tiledsurface.h"
+#include "backends/graphics3d/opengl/texture.h"
+#include "backends/graphics3d/opengl/framebuffer.h"
#include "backends/events/sdl/sdl-events.h"
+
#include "common/config-manager.h"
#include "common/file.h"
+
#include "engines/engine.h"
+
#include "graphics/conversion.h"
#include "graphics/opengl/context.h"
-#include "graphics/opengl/framebuffer.h"
-#include "graphics/opengl/surfacerenderer.h"
#include "graphics/opengl/system_headers.h"
-#include "graphics/opengl/texture.h"
-#include "graphics/opengl/tiledsurface.h"
#ifdef USE_PNG
#include "image/png.h"
diff --git a/backends/module.mk b/backends/module.mk
index 78da0c6a0ce..4a010b4deff 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -158,7 +158,14 @@ endif
ifdef USE_OPENGL
MODULE_OBJS += \
- graphics/openglsdl/openglsdl-graphics.o
+ graphics/openglsdl/openglsdl-graphics.o \
+ graphics3d/opengl/box_shaders.o \
+ graphics3d/opengl/control_shaders.o \
+ graphics3d/opengl/compat_shaders.o \
+ graphics3d/opengl/framebuffer.o \
+ graphics3d/opengl/surfacerenderer.o \
+ graphics3d/opengl/texture.o \
+ graphics3d/opengl/tiledsurface.o
endif
ifdef USE_DISCORD
diff --git a/engines/wintermute/base/gfx/base_renderer3d.h b/engines/wintermute/base/gfx/base_renderer3d.h
index df1b9988fe2..9a41e85053b 100644
--- a/engines/wintermute/base/gfx/base_renderer3d.h
+++ b/engines/wintermute/base/gfx/base_renderer3d.h
@@ -35,7 +35,6 @@
#if defined(USE_OPENGL_SHADERS)
#include "graphics/opengl/system_headers.h"
-#include "graphics/opengl/texture.h"
#endif
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
index e4b95770bf6..b3fa2f1c44c 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
@@ -35,7 +35,6 @@
#if defined(USE_OPENGL_GAME)
#include "graphics/opengl/system_headers.h"
-#include "graphics/opengl/texture.h"
namespace Wintermute {
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
index ed9995597f9..e720779945d 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
@@ -28,7 +28,6 @@
#include "engines/wintermute/math/vector2.h"
#include "graphics/opengl/system_headers.h"
-#include "graphics/opengl/texture.h"
#include "graphics/transform_struct.h"
#include "math/matrix4.h"
diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
index 9312aae0bb6..9fd64736486 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -174,7 +174,11 @@ bool BaseSurfaceOpenGL3D::create(const Common::String &filename, bool defaultCK,
delete _imageData;
}
- _imageData = img.getSurface()->convertTo(OpenGL::TextureGL::getRGBAPixelFormat(), img.getPalette());
+#ifdef SCUMM_BIG_ENDIAN
+ _imageData = img.getSurface()->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0), img.getPalette());
+#else
+ _imageData = img.getSurface()->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24), img.getPalette());
+#endif
if (BaseEngine::instance().getTargetExecutable() < WME_LITE) {
// WME 1.x always use colorkey, even for images with transparency
diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
index 1cd6029fc4e..15698ca3197 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
@@ -24,10 +24,10 @@
#include "engines/wintermute/base/gfx/base_surface.h"
-#include "graphics/opengl/texture.h"
-
#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
+#include "graphics/opengl/system_headers.h"
+
namespace Wintermute {
class BaseGame;
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
index 879b2a07515..10e500e03fa 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
@@ -20,6 +20,7 @@
*/
#include "engines/wintermute/wintypes.h"
+
#include "graphics/opengl/system_headers.h"
#if defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
index 1e6b5700ef1..ed3233f0d57 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -27,6 +27,7 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/dcgf.h"
+
#include "graphics/opengl/system_headers.h"
#if defined(USE_OPENGL_GAME)
diff --git a/graphics/module.mk b/graphics/module.mk
index 69573a85010..70ec14520ca 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -29,6 +29,8 @@ MODULE_OBJS := \
macgui/macwindowmanager.o \
managed_surface.o \
nine_patch.o \
+ opengl/context.o \
+ opengl/shader.o \
pixelformat.o \
primitives.o \
renderer.o \
@@ -46,16 +48,7 @@ MODULE_OBJS := \
VectorRenderer.o \
VectorRendererSpec.o \
wincursor.o \
- yuv_to_rgb.o \
- opengl/context.o \
- opengl/framebuffer.o \
- opengl/texture.o \
- opengl/tiledsurface.o \
- opengl/shader.o \
- opengl/surfacerenderer.o \
- opengl/box_shaders.o \
- opengl/control_shaders.o \
- opengl/compat_shaders.o
+ yuv_to_rgb.o
ifdef USE_TINYGL
MODULE_OBJS += \
More information about the Scummvm-git-logs
mailing list