22 #ifndef WINTERMUTE_BASE_RENDERER_3D_H 23 #define WINTERMUTE_BASE_RENDERER_3D_H 25 #include "engines/wintermute/base/gfx/base_renderer.h" 26 #include "engines/wintermute/coll_templ.h" 27 #include "engines/wintermute/dctypes.h" 28 #include "engines/wintermute/math/rect32.h" 29 #include "engines/wintermute/math/vector2.h" 31 #include "graphics/transform_struct.h" 32 #include "graphics/surface.h" 34 #include "math/matrix4.h" 37 #if defined(USE_OPENGL_SHADERS) 39 #include "graphics/opengl/system_headers.h" 48 class BaseSurfaceOpenGL3D;
59 bool setAmbientLightColor(uint32 color);
60 bool setDefaultAmbientLightColor();
61 virtual void setAmbientLight() = 0;
63 uint32 _ambientLightColor;
64 bool _overrideAmbientLightColor;
66 virtual int maximumLightsCount() = 0;
67 virtual void enableLight(
int index) = 0;
68 virtual void disableLight(
int index) = 0;
69 virtual void setLightParameters(
int index,
const Math::Vector3d &position,
const Math::Vector3d &direction,
70 const Math::Vector4d &diffuse,
bool spotlight) = 0;
72 virtual void setSpriteBlendMode(Graphics::TSpriteBlendMode blendMode) = 0;
74 virtual void enableCulling() = 0;
75 virtual void disableCulling() = 0;
77 virtual bool enableShadows() = 0;
78 virtual bool disableShadows() = 0;
79 virtual void displayShadow(
BaseObject *
object,
const Math::Vector3d &light,
bool lightPosRelative) = 0;
80 virtual bool stencilSupported() = 0;
82 Rect32 getViewPort()
override;
85 void fade(uint16 alpha)
override;
87 void initLoop()
override;
89 virtual bool setProjection2D() = 0;
90 virtual void setWorldTransform(
const Math::Matrix4 &transform) = 0;
92 void project(
const Math::Matrix4 &worldMatrix,
const Math::Vector3d &point, int32 &x, int32 &y);
93 Math::Ray rayIntoScene(
int x,
int y);
95 Math::Matrix4 lastProjectionMatrix() {
96 return _projectionMatrix3d;
99 virtual Mesh3DS *createMesh3DS() = 0;
100 virtual XMesh *createXMesh() = 0;
103 bool drawSprite(BaseSurfaceOpenGL3D &tex,
const Rect32 &rect,
float zoomX,
float zoomY,
const Vector2 &pos,
104 uint32 color,
bool alphaDisable, Graphics::TSpriteBlendMode blendMode,
bool mirrorX,
bool mirrorY);
106 float angle, uint32 color,
bool alphaDisable, Graphics::TSpriteBlendMode blendMode,
bool mirrorX,
bool mirrorY) = 0;
112 Math::Matrix3 build2dTransformation(
const Vector2 ¢er,
float angle);
115 Math::Matrix4 _lastViewMatrix;
116 Math::Matrix4 _projectionMatrix3d;
Definition: base_game.h:75
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
void fade(uint16 alpha) override
Definition: 3dshadow_volume.h:48
Definition: base_renderer3d.h:54
Definition: coll_templ.h:63
Definition: base_renderer.h:53
Definition: 3dcamera.h:40
Definition: base_object.h:57
Definition: achievements_tables.h:27