HPL1: Allow building without TinyGL

This commit is contained in:
Le Philousophe 2022-12-27 08:53:05 +01:00
parent b2c8c0dc8f
commit a69094c45e
6 changed files with 31 additions and 7 deletions

View File

@ -40,7 +40,11 @@ static iLowLevelGraphics *createLowLevelGfx()
if (Hpl1::useOpenGL())
return hplNew(cLowLevelGraphicsSDL, ());
#endif
#ifdef USE_TINYGL
return hplNew(LowLevelGraphicsTGL, ());
#else
error("Can't find a valid renderer: TinyGL is not supported");
#endif
}
LowLevelGameSetup::LowLevelGameSetup() {

View File

@ -29,6 +29,8 @@
#include "common/ptr.h"
#include "graphics/tinygl/tinygl.h"
#ifdef USE_TINYGL
namespace hpl {
TGLenum ColorFormatToTGL(eColorDataFormat format);
@ -277,4 +279,6 @@ private:
} // namespace hpl
#endif // HPL_LOWLEVELGRAPHICS_TGL_H
#endif // USE_TINYGL
#endif // HPL_LOWLEVELGRAPHICS_TGL_H

View File

@ -25,6 +25,8 @@
#include "hpl1/engine/graphics/OcclusionQuery.h"
#include "common/scummsys.h"
#ifdef USE_TINYGL
namespace hpl {
class OcclusionQueryTGL : public iOcclusionQuery {
@ -40,4 +42,6 @@ public:
} // namespace hpl
#endif // HPL_OCCLUSION_QUERY_TGL_H
#endif // USE_TINYGL
#endif // HPL_OCCLUSION_QUERY_TGL_H

View File

@ -26,6 +26,8 @@
#include "hpl1/engine/impl/low_level_graphics_tgl.h"
#include "hpl1/engine/graphics/bitmap2D.h"
#ifdef USE_TINYGL
namespace hpl {
class TGLTexture : public iTexture {
@ -92,4 +94,6 @@ private:
} // namespace hpl
#endif // HPL_TEXTURE_TGL_H
#endif // USE_TINYGL
#endif // HPL_TEXTURE_TGL_H

View File

@ -24,6 +24,8 @@
#include "hpl1/engine/graphics/VertexBuffer.h"
#ifdef USE_TINYGL
namespace hpl {
class VertexBufferTGL : public iVertexBuffer {
@ -83,4 +85,6 @@ private:
} // namespace hpl
#endif // HPL_RENDERER3D_OGL_H
#endif // USE_TINYGL
#endif // HPL_RENDERER3D_OGL_H

View File

@ -98,9 +98,6 @@ MODULE_OBJS := \
engine/impl/CollideShapeNewton.o \
engine/impl/KeyboardSDL.o \
engine/impl/LowLevelGraphicsSDL.o \
engine/impl/low_level_graphics_tgl.o \
engine/impl/texture_tgl.o \
engine/impl/vertex_buffer_tgl.o \
engine/impl/LowLevelInputSDL.o \
engine/impl/LowLevelPhysicsNewton.o \
engine/impl/LowLevelSoundOpenAL.o \
@ -392,6 +389,13 @@ MODULE_OBJS := \
engine/libraries/angelscript/sources/as_typeinfo.o \
engine/libraries/angelscript/sources/as_variablescope.o
ifdef USE_TINYGL
MODULE_OBJS += \
engine/impl/low_level_graphics_tgl.o \
engine/impl/texture_tgl.o \
engine/impl/vertex_buffer_tgl.o
endif
# This module can be built as a plugin
ifeq ($(ENABLE_HPL1), DYNAMIC_PLUGIN)
PLUGIN := 1