2012-06-24 13:41:56 +00:00
|
|
|
// * This file is part of the COLOBOT source code
|
|
|
|
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
|
|
|
|
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
|
|
|
// *
|
|
|
|
// * This program is free software: you can redistribute it and/or modify
|
|
|
|
// * it under the terms of the GNU General Public License as published by
|
|
|
|
// * the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// * (at your option) any later version.
|
|
|
|
// *
|
|
|
|
// * This program is distributed in the hope that it will be useful,
|
|
|
|
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// * GNU General Public License for more details.
|
|
|
|
// *
|
|
|
|
// * You should have received a copy of the GNU General Public License
|
|
|
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
|
|
2012-08-11 16:39:16 +00:00
|
|
|
/**
|
|
|
|
* \file graphics/core/device.h
|
2012-09-19 21:50:28 +00:00
|
|
|
* \brief Abstract graphics device - CDevice class and related structs/enums
|
2012-08-11 16:39:16 +00:00
|
|
|
*/
|
2012-06-24 13:41:56 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
2012-07-26 20:26:19 +00:00
|
|
|
#include "graphics/core/color.h"
|
|
|
|
#include "graphics/core/light.h"
|
|
|
|
#include "graphics/core/material.h"
|
|
|
|
#include "graphics/core/texture.h"
|
|
|
|
#include "graphics/core/vertex.h"
|
2012-09-19 21:50:28 +00:00
|
|
|
|
2012-08-11 15:17:04 +00:00
|
|
|
#include "math/intpoint.h"
|
2012-06-30 23:37:30 +00:00
|
|
|
#include "math/matrix.h"
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
#include <string>
|
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
|
2012-07-03 22:04:53 +00:00
|
|
|
class CImage;
|
2012-08-03 21:23:13 +00:00
|
|
|
struct ImageData;
|
2012-07-03 22:04:53 +00:00
|
|
|
|
|
|
|
|
2012-09-19 21:50:28 +00:00
|
|
|
// Graphics module namespace
|
2012-06-24 13:41:56 +00:00
|
|
|
namespace Gfx {
|
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \struct DeviceConfig
|
|
|
|
* \brief General config for graphics device
|
|
|
|
*
|
|
|
|
* These settings are common window options set by SDL.
|
|
|
|
*/
|
2012-06-25 17:59:17 +00:00
|
|
|
struct DeviceConfig
|
|
|
|
{
|
2012-07-29 13:09:53 +00:00
|
|
|
//! Screen size
|
2012-08-11 15:17:04 +00:00
|
|
|
Math::IntPoint size;
|
2012-06-26 20:23:05 +00:00
|
|
|
//! Bits per pixel
|
|
|
|
int bpp;
|
|
|
|
//! Full screen
|
|
|
|
bool fullScreen;
|
|
|
|
//! Resizeable window
|
|
|
|
bool resizeable;
|
|
|
|
//! Double buffering
|
|
|
|
bool doubleBuf;
|
|
|
|
//! No window frame (also set with full screen)
|
|
|
|
bool noFrame;
|
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
//! Constructor calls LoadDefault()
|
|
|
|
DeviceConfig() { LoadDefault(); }
|
|
|
|
|
|
|
|
//! Loads the default values
|
2012-07-24 22:27:01 +00:00
|
|
|
inline void LoadDefault()
|
|
|
|
{
|
2012-08-11 15:17:04 +00:00
|
|
|
size = Math::IntPoint(800, 600);
|
2012-07-24 22:27:01 +00:00
|
|
|
bpp = 32;
|
|
|
|
fullScreen = false;
|
2012-09-30 01:18:11 +00:00
|
|
|
resizeable = true;
|
2012-07-24 22:27:01 +00:00
|
|
|
doubleBuf = true;
|
|
|
|
noFrame = false;
|
|
|
|
}
|
2012-06-30 23:37:30 +00:00
|
|
|
};
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum TransformType
|
|
|
|
* \brief Type of transformation in rendering pipeline
|
|
|
|
*
|
|
|
|
* These correspond to DirectX's three transformation matrices.
|
|
|
|
*/
|
2012-06-30 23:37:30 +00:00
|
|
|
enum TransformType
|
|
|
|
{
|
|
|
|
TRANSFORM_WORLD,
|
|
|
|
TRANSFORM_VIEW,
|
|
|
|
TRANSFORM_PROJECTION
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum RenderState
|
|
|
|
* \brief Render states that can be enabled/disabled
|
|
|
|
*/
|
2012-06-30 23:37:30 +00:00
|
|
|
enum RenderState
|
|
|
|
{
|
|
|
|
RENDER_STATE_LIGHTING,
|
2012-07-01 20:59:22 +00:00
|
|
|
RENDER_STATE_BLENDING,
|
|
|
|
RENDER_STATE_FOG,
|
|
|
|
RENDER_STATE_DEPTH_TEST,
|
|
|
|
RENDER_STATE_DEPTH_WRITE,
|
|
|
|
RENDER_STATE_ALPHA_TEST,
|
2012-07-22 20:05:12 +00:00
|
|
|
RENDER_STATE_CULLING,
|
2012-07-01 20:59:22 +00:00
|
|
|
RENDER_STATE_DITHERING
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum CompFunc
|
|
|
|
* \brief Type of function used to compare values
|
|
|
|
*/
|
2012-07-01 20:59:22 +00:00
|
|
|
enum CompFunc
|
|
|
|
{
|
|
|
|
COMP_FUNC_NEVER,
|
|
|
|
COMP_FUNC_LESS,
|
|
|
|
COMP_FUNC_EQUAL,
|
|
|
|
COMP_FUNC_NOTEQUAL,
|
|
|
|
COMP_FUNC_LEQUAL,
|
|
|
|
COMP_FUNC_GREATER,
|
|
|
|
COMP_FUNC_GEQUAL,
|
|
|
|
COMP_FUNC_ALWAYS
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum BlendFunc
|
|
|
|
* \brief Type of blending function
|
|
|
|
*/
|
2012-07-01 20:59:22 +00:00
|
|
|
enum BlendFunc
|
|
|
|
{
|
|
|
|
BLEND_ZERO,
|
|
|
|
BLEND_ONE,
|
|
|
|
BLEND_SRC_COLOR,
|
|
|
|
BLEND_INV_SRC_COLOR,
|
|
|
|
BLEND_DST_COLOR,
|
|
|
|
BLEND_INV_DST_COLOR,
|
|
|
|
BLEND_SRC_ALPHA,
|
|
|
|
BLEND_INV_SRC_ALPHA,
|
|
|
|
BLEND_DST_ALPHA,
|
|
|
|
BLEND_INV_DST_ALPHA,
|
|
|
|
BLEND_SRC_ALPHA_SATURATE
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum FogMode
|
|
|
|
* \brief Type of fog calculation function
|
|
|
|
*/
|
2012-07-01 20:59:22 +00:00
|
|
|
enum FogMode
|
|
|
|
{
|
|
|
|
FOG_LINEAR,
|
|
|
|
FOG_EXP,
|
|
|
|
FOG_EXP2
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum CullMode
|
|
|
|
* \brief Culling mode for polygons
|
|
|
|
*/
|
2012-07-01 20:59:22 +00:00
|
|
|
enum CullMode
|
|
|
|
{
|
2012-08-12 08:45:04 +00:00
|
|
|
//! Cull clockwise faces
|
2012-07-01 20:59:22 +00:00
|
|
|
CULL_CW,
|
2012-08-12 08:45:04 +00:00
|
|
|
//! Cull counter-clockwise faces
|
2012-07-01 20:59:22 +00:00
|
|
|
CULL_CCW
|
|
|
|
};
|
|
|
|
|
2012-07-03 22:04:53 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum ShadeModel
|
|
|
|
* \brief Shade model used in rendering
|
|
|
|
*/
|
2012-07-03 22:04:53 +00:00
|
|
|
enum ShadeModel
|
|
|
|
{
|
|
|
|
SHADE_FLAT,
|
|
|
|
SHADE_SMOOTH
|
|
|
|
};
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum FillMode
|
|
|
|
* \brief Polygon fill mode
|
|
|
|
*/
|
2012-07-01 20:59:22 +00:00
|
|
|
enum FillMode
|
|
|
|
{
|
|
|
|
//! Draw only points
|
|
|
|
FILL_POINT,
|
|
|
|
//! Draw only lines
|
|
|
|
FILL_LINES,
|
|
|
|
//! Draw full polygons
|
2012-09-19 21:50:28 +00:00
|
|
|
FILL_POLY
|
2012-06-30 23:37:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum PrimitiveType
|
|
|
|
* \brief Type of primitive to render
|
|
|
|
*/
|
2012-06-30 23:37:30 +00:00
|
|
|
enum PrimitiveType
|
|
|
|
{
|
2012-07-30 20:32:28 +00:00
|
|
|
PRIMITIVE_POINTS,
|
2012-07-01 20:59:22 +00:00
|
|
|
PRIMITIVE_LINES,
|
2012-07-30 20:32:28 +00:00
|
|
|
PRIMITIVE_LINE_STRIP,
|
2012-06-30 23:37:30 +00:00
|
|
|
PRIMITIVE_TRIANGLES,
|
|
|
|
PRIMITIVE_TRIANGLE_STRIP
|
2012-06-25 17:59:17 +00:00
|
|
|
};
|
|
|
|
|
2012-07-18 19:47:47 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \enum IntersectPlane
|
|
|
|
* \brief Intersection plane of projection volume
|
|
|
|
*
|
|
|
|
* These flags can be OR'd together.
|
|
|
|
*/
|
2012-07-18 19:47:47 +00:00
|
|
|
enum IntersectPlane
|
|
|
|
{
|
|
|
|
INTERSECT_PLANE_LEFT = 0x01,
|
|
|
|
INTERSECT_PLANE_RIGHT = 0x02,
|
|
|
|
INTERSECT_PLANE_TOP = 0x04,
|
|
|
|
INTERSECT_PLANE_BOTTOM = 0x08,
|
|
|
|
INTERSECT_PLANE_FRONT = 0x10,
|
|
|
|
INTERSECT_PLANE_BACK = 0x20,
|
|
|
|
INTERSECT_PLANE_ALL = INTERSECT_PLANE_LEFT | INTERSECT_PLANE_RIGHT |
|
|
|
|
INTERSECT_PLANE_TOP | INTERSECT_PLANE_BOTTOM |
|
|
|
|
INTERSECT_PLANE_FRONT | INTERSECT_PLANE_BACK
|
|
|
|
};
|
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
/**
|
2012-09-19 21:50:28 +00:00
|
|
|
* \class CDevice
|
|
|
|
* \brief Abstract interface of graphics device
|
|
|
|
*
|
|
|
|
* It is based on DIRECT3DDEVICE class from DirectX to make it easier to port existing code.
|
|
|
|
* It encapsulates the general graphics device state and provides a common interface
|
|
|
|
* to graphics-specific functions which will be used throughout the program,
|
|
|
|
* both in CEngine class and in UI classes. Note that it doesn't contain all functions from DirectX,
|
|
|
|
* only those that were used in old code.
|
|
|
|
*
|
2012-06-30 23:37:30 +00:00
|
|
|
*/
|
2012-06-24 13:41:56 +00:00
|
|
|
class CDevice
|
|
|
|
{
|
2012-06-30 23:37:30 +00:00
|
|
|
public:
|
2012-07-01 20:59:22 +00:00
|
|
|
virtual ~CDevice() {}
|
|
|
|
|
2012-08-12 08:45:04 +00:00
|
|
|
//! Provides a hook to debug graphics code (implementation-specific)
|
|
|
|
virtual void DebugHook() = 0;
|
|
|
|
|
2012-06-30 23:37:30 +00:00
|
|
|
//! Initializes the device, setting the initial state
|
2012-07-01 20:59:22 +00:00
|
|
|
virtual bool Create() = 0;
|
2012-06-30 23:37:30 +00:00
|
|
|
//! Destroys the device, releasing every acquired resource
|
|
|
|
virtual void Destroy() = 0;
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Begins drawing the 3D scene
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void BeginScene() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Ends drawing the 3D scene
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void EndScene() = 0;
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Clears the screen to blank
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void Clear() = 0;
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Sets the transform matrix of given type
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void SetTransform(TransformType type, const Math::Matrix &matrix) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current transform matrix of given type
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual const Math::Matrix& GetTransform(TransformType type) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Multiplies the current transform matrix of given type by given matrix
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void MultiplyTransform(TransformType type, const Math::Matrix &matrix) = 0;
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Sets the current material
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetMaterial(const Material &material) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current material
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual const Material& GetMaterial() = 0;
|
2012-06-30 23:37:30 +00:00
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the maximum number of lights available
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual int GetMaxLightCount() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Sets the light at given index
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetLight(int index, const Light &light) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current light at given index
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual const Light& GetLight(int index) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Enables/disables the light at given index
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual void SetLightEnabled(int index, bool enabled) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current enable state of light at given index
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual bool GetLightEnabled(int index) = 0;
|
|
|
|
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Creates a texture from image; the image can be safely removed after that
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) = 0;
|
2012-08-03 21:23:13 +00:00
|
|
|
//! Creates a texture from raw image data; image data can be freed after that
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Deletes a given texture, freeing it from video memory
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void DestroyTexture(const Texture &texture) = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Deletes all textures created so far
|
|
|
|
virtual void DestroyAllTextures() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Returns the maximum number of multitexture stages
|
2012-06-30 23:37:30 +00:00
|
|
|
virtual int GetMaxTextureCount() = 0;
|
2012-08-03 21:23:13 +00:00
|
|
|
//! Sets the texture at given texture stage
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetTexture(int index, const Texture &texture) = 0;
|
2012-08-03 21:23:13 +00:00
|
|
|
//! Sets the texture image by ID at given texture stage
|
|
|
|
virtual void SetTexture(int index, unsigned int textureId) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the (multi)texture at given index
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual Texture GetTexture(int index) = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Enables/disables the given texture stage
|
|
|
|
virtual void SetTextureEnabled(int index, bool enabled) = 0;
|
|
|
|
//! Returns the current enable state of given texture stage
|
|
|
|
virtual bool GetTextureEnabled(int index) = 0;
|
2012-06-30 23:37:30 +00:00
|
|
|
|
2012-07-24 22:27:01 +00:00
|
|
|
//! Sets the params for texture stage with given index
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) = 0;
|
2012-07-24 22:27:01 +00:00
|
|
|
//! Returns the current params of texture stage with given index
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual TextureStageParams GetTextureStageParams(int index) = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
|
2012-09-29 08:40:11 +00:00
|
|
|
//! Sets only the texture wrap modes (for faster than thru stage params)
|
|
|
|
virtual void SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode wrapT) = 0;
|
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Renders primitive composed of vertices with single texture
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Renders primitive composed of vertices with color information and single texture
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Renders primitive composed of vertices with multitexturing (2 textures)
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount) = 0;
|
2012-06-30 23:37:30 +00:00
|
|
|
|
2012-07-18 19:47:47 +00:00
|
|
|
//! Tests whether a sphere intersects the 6 clipping planes of projection volume
|
2012-07-22 20:05:12 +00:00
|
|
|
virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Enables/disables the given render state
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetRenderState(RenderState state, bool enabled) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current setting of given render state
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual bool GetRenderState(RenderState state) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the function of depth test
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetDepthTestFunc(CompFunc func) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current function of depth test
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual CompFunc GetDepthTestFunc() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the depth bias (constant value added to Z-coords)
|
|
|
|
virtual void SetDepthBias(float factor) = 0;
|
|
|
|
//! Returns the current depth bias
|
|
|
|
virtual float GetDepthBias() = 0;
|
|
|
|
|
|
|
|
//! Sets the alpha test function and reference value
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetAlphaTestFunc(CompFunc func, float refValue) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current alpha test function and reference value
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void GetAlphaTestFunc(CompFunc &func, float &refValue) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the blending functions for source and destination operations
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current blending functions for source and destination operations
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void GetBlendFunc(BlendFunc &srcBlend, BlendFunc &dstBlend) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the clear color
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetClearColor(const Color &color) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current clear color
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual Color GetClearColor() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the global ambient color
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetGlobalAmbient(const Color &color) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the global ambient color
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual Color GetGlobalAmbient() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the fog parameters: mode, color, start distance, end distance and density (for exp models)
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current fog parameters: mode, color, start distance, end distance and density (for exp models)
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void GetFogParams(FogMode &mode, Color &color, float &start, float &end, float &density) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
|
|
|
//! Sets the current cull mode
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetCullMode(CullMode mode) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current cull mode
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual CullMode GetCullMode() = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Sets the shade model
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetShadeModel(ShadeModel model) = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
//! Returns the current shade model
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual ShadeModel GetShadeModel() = 0;
|
2012-07-03 22:04:53 +00:00
|
|
|
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Sets the current fill mode
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual void SetFillMode(FillMode mode) = 0;
|
2012-07-01 20:59:22 +00:00
|
|
|
//! Returns the current fill mode
|
2012-09-19 21:50:28 +00:00
|
|
|
virtual FillMode GetFillMode() = 0;
|
2012-06-24 13:41:56 +00:00
|
|
|
};
|
|
|
|
|
2012-09-19 21:50:28 +00:00
|
|
|
|
|
|
|
} // namespace Gfx
|