104 TRANSFORM_PROJECTION,
114 RENDER_STATE_LIGHTING,
115 RENDER_STATE_BLENDING,
117 RENDER_STATE_DEPTH_TEST,
118 RENDER_STATE_DEPTH_WRITE,
119 RENDER_STATE_ALPHA_TEST,
120 RENDER_STATE_CULLING,
121 RENDER_STATE_DEPTH_BIAS,
156 BLEND_SRC_ALPHA_SATURATE
214 PRIMITIVE_LINE_STRIP,
216 PRIMITIVE_TRIANGLE_STRIP
227 FRUSTUM_PLANE_LEFT = 0x01,
228 FRUSTUM_PLANE_RIGHT = 0x02,
229 FRUSTUM_PLANE_TOP = 0x04,
230 FRUSTUM_PLANE_BOTTOM = 0x08,
231 FRUSTUM_PLANE_FRONT = 0x10,
232 FRUSTUM_PLANE_BACK = 0x20,
233 FRUSTUM_PLANE_ALL = FRUSTUM_PLANE_LEFT | FRUSTUM_PLANE_RIGHT |
234 FRUSTUM_PLANE_TOP | FRUSTUM_PLANE_BOTTOM |
235 FRUSTUM_PLANE_FRONT | FRUSTUM_PLANE_BACK
246 RENDER_TARGET_STENCIL
254 virtual void* GetPixelsData() = 0;
274 virtual void DebugHook() = 0;
277 virtual void DebugLights() = 0;
280 virtual bool Create() = 0;
282 virtual void Destroy() = 0;
285 virtual void ConfigChanged(
const DeviceConfig &newConfig) = 0;
288 virtual void BeginScene() = 0;
290 virtual void EndScene() = 0;
293 virtual void Clear() = 0;
299 virtual void SetMaterial(
const Material &material) = 0;
302 virtual int GetMaxLightCount() = 0;
304 virtual void SetLight(
int index,
const Light &light) = 0;
306 virtual void SetLightEnabled(
int index,
bool enabled) = 0;
313 virtual Texture CreateDepthTexture(
int width,
int height,
int depth) = 0;
315 virtual void DestroyTexture(
const Texture &texture) = 0;
317 virtual void DestroyAllTextures() = 0;
320 virtual int GetMaxTextureStageCount() = 0;
322 virtual void SetTexture(
int index,
const Texture &texture) = 0;
324 virtual void SetTexture(
int index,
unsigned int textureId) = 0;
326 virtual void SetTextureEnabled(
int index,
bool enabled) = 0;
339 Color color =
Color(1.0f, 1.0f, 1.0f, 1.0f)) = 0;
342 Color color =
Color(1.0f, 1.0f, 1.0f, 1.0f)) = 0;
347 virtual unsigned int CreateStaticBuffer(
PrimitiveType primitiveType,
const Vertex* vertices,
int vertexCount) = 0;
350 virtual unsigned int CreateStaticBuffer(
PrimitiveType primitiveType,
const VertexTex2* vertices,
int vertexCount) = 0;
353 virtual unsigned int CreateStaticBuffer(
PrimitiveType primitiveType,
const VertexCol* vertices,
int vertexCount) = 0;
356 virtual void UpdateStaticBuffer(
unsigned int bufferId,
PrimitiveType primitiveType,
const Vertex* vertices,
int vertexCount) = 0;
359 virtual void UpdateStaticBuffer(
unsigned int bufferId,
PrimitiveType primitiveType,
const VertexTex2* vertices,
int vertexCount) = 0;
362 virtual void UpdateStaticBuffer(
unsigned int bufferId,
PrimitiveType primitiveType,
const VertexCol* vertices,
int vertexCount) = 0;
365 virtual void DrawStaticBuffer(
unsigned int bufferId) = 0;
368 virtual void DestroyStaticBuffer(
unsigned int bufferId) = 0;
372 virtual int ComputeSphereVisibility(
const Math::Vector ¢er,
float radius) = 0;
375 virtual void SetViewport(
int x,
int y,
int width,
int height) = 0;
378 virtual void SetRenderState(
RenderState state,
bool enabled) = 0;
381 virtual void SetColorMask(
bool red,
bool green,
bool blue,
bool alpha) = 0;
384 virtual void SetDepthTestFunc(
CompFunc func) = 0;
387 virtual void SetDepthBias(
float factor,
float units) = 0;
390 virtual void SetAlphaTestFunc(
CompFunc func,
float refValue) = 0;
396 virtual void SetClearColor(
const Color &color) = 0;
399 virtual void SetGlobalAmbient(
const Color &color) = 0;
402 virtual void SetFogParams(
FogMode mode,
const Color &color,
float start,
float end,
float density) = 0;
405 virtual void SetCullMode(
CullMode mode) = 0;
408 virtual void SetShadeModel(
ShadeModel model) = 0;
411 virtual void SetShadowColor(
float value) = 0;
414 virtual void SetFillMode(
FillMode mode) = 0;
417 virtual void CopyFramebufferToTexture(
Texture& texture,
int xOffset,
int yOffset,
int x,
int y,
int width,
int height) = 0;
420 virtual std::unique_ptr<CFrameBufferPixels> GetFrameBufferPixels()
const = 0;
423 virtual CFramebuffer* GetFramebuffer(std::string name) = 0;
429 virtual void DeleteFramebuffer(std::string name) = 0;
432 virtual bool IsAnisotropySupported() = 0;
435 virtual int GetMaxAnisotropyLevel() = 0;
438 virtual int GetMaxSamples() = 0;
441 virtual bool IsShadowMappingSupported() = 0;
444 virtual int GetMaxTextureSize() = 0;
447 virtual bool IsFramebufferSupported() = 0;
Abstract representation of framebuffer and offscreen buffers.
Draw only points.
Definition: device.h:199
void LoadDefault()
Loads the default values.
Definition: device.h:87
bool noFrame
No window frame (also set with full screen)
Definition: device.h:68
Vertex of a primitive.
Definition: vertex.h:52
bool fullScreen
Full screen.
Definition: device.h:62
Vertex with secondary texture coordinates.
Definition: vertex.h:113
FogMode
Type of fog calculation function.
Definition: device.h:163
int greenSize
Size of green channel in bits.
Definition: device.h:73
4x4 matrix
Definition: matrix.h:65
TexWrapMode
Wrapping mode for texture coords.
Definition: texture.h:99
Math::IntPoint size
Screen size.
Definition: device.h:58
FillMode
Polygon fill mode.
Definition: device.h:196
Texture struct and related enums.
CompFunc
Type of function used to compare values.
Definition: device.h:128
Parameters for a texture unit.
Definition: texture.h:180
Light struct and related enums.
Material of a surface.
Definition: material.h:45
int depthSize
Color depth in bits.
Definition: device.h:79
int bpp
Bits per pixel.
Definition: device.h:60
Parameters for texture coordinate generation.
Definition: texture.h:234
bool resizeable
Resizeable window.
Definition: device.h:64
FrustumPlane
Planes of frustum space.
Definition: device.h:225
General config for graphics device.
Definition: device.h:55
Properties of light in 3D scene.
Definition: light.h:54
Color structs and related functions.
Parameters for texture creation.
Definition: texture.h:155
ShadeModel
Shade model used in rendering.
Definition: device.h:186
BlendFunc
Type of blending function.
Definition: device.h:144
int alphaSize
Size of alpha channel in bits.
Definition: device.h:77
Matrix struct and related functions.
int blueSize
Size of blue channel in bits.
Definition: device.h:75
Image loaded from file.
Definition: image.h:54
Cull clockwise faces.
Definition: device.h:177
Contains parameters for new framebuffer.
Definition: framebuffer.h:34
PrimitiveType
Type of primitive to render.
Definition: device.h:210
Draw full polygons.
Definition: device.h:203
CullMode
Culling mode for polygons.
Definition: device.h:174
Colored vertex.
Definition: vertex.h:84
int stencilSize
Stencil depth in bits.
Definition: device.h:81
int redSize
Size of red channel in bits.
Definition: device.h:71
Namespace for (new) graphics code.
Definition: app.h:49
Implementation-specific image data.
Definition: image.h:41
Cull counter-clockwise faces.
Definition: device.h:179
RenderState
Render states that can be enabled/disabled.
Definition: device.h:112
Info about a texture.
Definition: texture.h:256
bool doubleBuf
Double buffering.
Definition: device.h:66
3D (3x1) vector
Definition: vector.h:53
bool hardwareAccel
Force hardware acceleration (video mode set will fail on lack of hw accel)
Definition: device.h:84
2D Point with integer coords
Definition: intpoint.h:39
RGBA color.
Definition: color.h:39
TransformType
Type of transformation in rendering pipeline.
Definition: device.h:100
Draw only lines.
Definition: device.h:201
Abstract interface of graphics device.
Definition: device.h:268
Abstract interface of default framebuffer and offscreen framebuffers.
Definition: framebuffer.h:67
RenderTarget
Render targets for rendering to textures.
Definition: device.h:242