56 void Clear()
override;
74 void SetTexture(
int index,
unsigned int textureId)
override;
97 void SetViewport(
int x,
int y,
int width,
int height)
override;
101 void SetColorMask(
bool red,
bool green,
bool blue,
bool alpha)
override;
void BeginScene() override
Begins drawing the 3D scene.
Definition: nulldevice.cpp:60
void SetCullMode(CullMode mode) override
Sets the current cull mode.
Definition: nulldevice.cpp:245
void SetColorMask(bool red, bool green, bool blue, bool alpha) override
Sets the color mask.
Definition: nulldevice.cpp:213
std::unique_ptr< CFrameBufferPixels > GetFrameBufferPixels() const override
Returns the pixels of the entire screen.
Definition: nulldevice.cpp:265
void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) override
Sets the blending functions for source and destination operations.
Definition: nulldevice.cpp:229
void DeleteFramebuffer(std::string name) override
Deletes framebuffer.
Definition: nulldevice.cpp:280
void SetFillMode(FillMode mode) override
Sets the current fill mode.
Definition: nulldevice.cpp:257
Vertex of a primitive.
Definition: vertex.h:52
Vertex with secondary texture coordinates.
Definition: vertex.h:113
void SetLightEnabled(int index, bool enabled) override
Enables/disables the light at given index.
Definition: nulldevice.cpp:89
void SetShadeModel(ShadeModel model) override
Sets the shade model.
Definition: nulldevice.cpp:249
bool Create() override
Initializes the device, setting the initial state.
Definition: nulldevice.cpp:47
void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex *vertices, int vertexCount) override
Updates the static buffer composed of given primitives with single texture vertices.
Definition: nulldevice.cpp:180
FogMode
Type of fog calculation function.
Definition: device.h:163
void SetShadowColor(float value) override
Sets shadow color.
Definition: nulldevice.cpp:253
int GetMaxLightCount() override
Returns the maximum number of lights available.
Definition: nulldevice.cpp:80
bool IsShadowMappingSupported() override
Checks if shadow mapping is supported.
Definition: nulldevice.cpp:299
int GetMaxTextureSize() override
Returns max texture size supported.
Definition: nulldevice.cpp:304
void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) override
Sets the fog parameters: mode, color, start distance, end distance and density (for exp models) ...
Definition: nulldevice.cpp:241
4x4 matrix
Definition: matrix.h:65
void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override
Sets only the texture wrap modes (for faster than thru stage params)
Definition: nulldevice.cpp:143
void SetRenderState(RenderState state, bool enabled) override
Enables/disables the given render state.
Definition: nulldevice.cpp:209
TexWrapMode
Wrapping mode for texture coords.
Definition: texture.h:99
bool IsFramebufferSupported() override
Checks if framebuffers are supported.
Definition: nulldevice.cpp:309
void SetTexture(int index, const Texture &texture) override
Sets the texture at given texture stage.
Definition: nulldevice.cpp:127
void DrawStaticBuffer(unsigned int bufferId) override
Draws a static buffer.
Definition: nulldevice.cpp:192
FillMode
Polygon fill mode.
Definition: device.h:196
void DestroyStaticBuffer(unsigned int bufferId) override
Deletes a static buffer.
Definition: nulldevice.cpp:196
CompFunc
Type of function used to compare values.
Definition: device.h:128
Parameters for a texture unit.
Definition: texture.h:180
Material of a surface.
Definition: material.h:45
void DestroyAllTextures() override
Deletes all textures created so far.
Definition: nulldevice.cpp:118
unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex *vertices, int vertexCount) override
Creates a static buffer composed of given primitives with single texture vertices.
Definition: nulldevice.cpp:165
void SetClearColor(const Color &color) override
Sets the clear color.
Definition: nulldevice.cpp:233
int ComputeSphereVisibility(const Math::Vector ¢er, float radius) override
Definition: nulldevice.cpp:200
Parameters for texture coordinate generation.
Definition: texture.h:234
void DebugHook() override
Provides a hook to debug graphics code (implementation-specific)
Definition: nulldevice.cpp:39
General config for graphics device.
Definition: device.h:55
Properties of light in 3D scene.
Definition: light.h:54
Device implementation that doesn't render anything.
Definition: nulldevice.h:39
void SetMaterial(const Material &material) override
Sets the current material.
Definition: nulldevice.cpp:76
void SetTextureEnabled(int index, bool enabled) override
Enables/disables the given texture stage.
Definition: nulldevice.cpp:135
void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override
Sets the texture coordinate generation mode for given texture unit.
Definition: nulldevice.cpp:147
void DestroyTexture(const Texture &texture) override
Deletes a given texture, freeing it from video memory.
Definition: nulldevice.cpp:114
void ConfigChanged(const DeviceConfig &newConfig) override
Changes configuration.
Definition: nulldevice.cpp:56
void SetGlobalAmbient(const Color &color) override
Sets the global ambient color.
Definition: nulldevice.cpp:237
Parameters for texture creation.
Definition: texture.h:155
Texture CreateDepthTexture(int width, int height, int depth) override
Creates a depth texture with specific dimensions and depth.
Definition: nulldevice.cpp:107
ShadeModel
Shade model used in rendering.
Definition: device.h:186
BlendFunc
Type of blending function.
Definition: device.h:144
void SetDepthTestFunc(CompFunc func) override
Sets the function of depth test.
Definition: nulldevice.cpp:217
void SetViewport(int x, int y, int width, int height) override
Changes rendering viewport.
Definition: nulldevice.cpp:205
Image loaded from file.
Definition: image.h:54
Contains parameters for new framebuffer.
Definition: framebuffer.h:34
void EndScene() override
Ends drawing the 3D scene.
Definition: nulldevice.cpp:64
PrimitiveType
Type of primitive to render.
Definition: device.h:210
CFramebuffer * CreateFramebuffer(std::string name, const FramebufferParams ¶ms) override
Creates new framebuffer with given name or nullptr if it's not possible.
Definition: nulldevice.cpp:275
CullMode
Culling mode for polygons.
Definition: device.h:174
Colored vertex.
Definition: vertex.h:84
void SetTextureStageParams(int index, const TextureStageParams ¶ms) override
Sets the params for texture stage with given index.
Definition: nulldevice.cpp:139
Namespace for (new) graphics code.
Definition: app.h:49
Implementation-specific image data.
Definition: image.h:41
RenderState
Render states that can be enabled/disabled.
Definition: device.h:112
Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) override
Creates a texture from image; the image can be safely removed after that.
Definition: nulldevice.cpp:93
Info about a texture.
Definition: texture.h:256
int GetMaxSamples() override
Returns max samples supported.
Definition: nulldevice.cpp:294
void SetLight(int index, const Light &light) override
Sets the light at given index.
Definition: nulldevice.cpp:85
int GetMaxAnisotropyLevel() override
Returns max anisotropy level supported.
Definition: nulldevice.cpp:289
void DrawPrimitive(PrimitiveType type, const Vertex *vertices, int vertexCount, Color color=Color(1.0f, 1.0f, 1.0f, 1.0f)) override
Renders primitive composed of vertices with single texture.
Definition: nulldevice.cpp:151
void Clear() override
Clears the screen to blank.
Definition: nulldevice.cpp:68
3D (3x1) vector
Definition: vector.h:53
Abstract graphics device - CDevice class and related structs/enums.
void SetAlphaTestFunc(CompFunc func, float refValue) override
Sets the alpha test function and reference value.
Definition: nulldevice.cpp:225
RGBA color.
Definition: color.h:39
int GetMaxTextureStageCount() override
Returns the maximum number of multitexture stages.
Definition: nulldevice.cpp:122
void SetTransform(TransformType type, const Math::Matrix &matrix) override
Sets the transform matrix of given type.
Definition: nulldevice.cpp:72
void Destroy() override
Destroys the device, releasing every acquired resource.
Definition: nulldevice.cpp:52
bool IsAnisotropySupported() override
Checks if anisotropy is supported.
Definition: nulldevice.cpp:284
void CopyFramebufferToTexture(Texture &texture, int xOffset, int yOffset, int x, int y, int width, int height) override
Copies content of framebuffer to texture.
Definition: nulldevice.cpp:261
CFramebuffer * GetFramebuffer(std::string name) override
Returns framebuffer with given name or nullptr if it doesn't exist.
Definition: nulldevice.cpp:270
TransformType
Type of transformation in rendering pipeline.
Definition: device.h:100
void SetDepthBias(float factor, float units) override
Sets the depth bias (constant value added to Z-coords)
Definition: nulldevice.cpp:221
Abstract interface of graphics device.
Definition: device.h:268
Abstract interface of default framebuffer and offscreen framebuffers.
Definition: framebuffer.h:67
void DebugLights() override
Displays light positions to aid in debuggings.
Definition: nulldevice.cpp:43