| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- /*
- -----------------------------------------------------------------------------
- This source file is part of OGRE
- (Object-oriented Graphics Rendering Engine)
- For the latest info, see http://www.ogre3d.org/
- Copyright (c) 2000-2011 Torus Knot Software Ltd
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- -----------------------------------------------------------------------------
- */
- #ifndef __Common_H__
- #define __Common_H__
- // Common stuff
- #include "CmString.h"
- #if defined ( CM_GCC_VISIBILITY )
- # pragma GCC visibility push(default)
- #endif
- #include <utility>
- #include <sstream>
- #if defined ( CM_GCC_VISIBILITY )
- # pragma GCC visibility pop
- #endif
- namespace CamelotEngine {
- /** \addtogroup Core
- * @{
- */
- /** \addtogroup General
- * @{
- */
- /** Blending factors for manually blending objects with the scene. If there isn't a predefined
- SceneBlendType that you like, then you can specify the blending factors directly to affect the
- combination of object and the existing scene. See Material::setSceneBlending for more details.
- */
- enum SceneBlendFactor
- {
- SBF_ONE,
- SBF_ZERO,
- SBF_DEST_COLOUR,
- SBF_SOURCE_COLOUR,
- SBF_ONE_MINUS_DEST_COLOUR,
- SBF_ONE_MINUS_SOURCE_COLOUR,
- SBF_DEST_ALPHA,
- SBF_SOURCE_ALPHA,
- SBF_ONE_MINUS_DEST_ALPHA,
- SBF_ONE_MINUS_SOURCE_ALPHA
- };
- /** Blending operations controls how objects are blended into the scene. The default operation
- is add (+) but by changing this you can change how drawn objects are blended into the
- existing scene.
- */
- enum SceneBlendOperation
- {
- SBO_ADD,
- SBO_SUBTRACT,
- SBO_REVERSE_SUBTRACT,
- SBO_MIN,
- SBO_MAX
- };
- /** Comparison functions used for the depth/stencil buffer operations and
- others. */
- enum CompareFunction
- {
- CMPF_ALWAYS_FAIL,
- CMPF_ALWAYS_PASS,
- CMPF_LESS,
- CMPF_LESS_EQUAL,
- CMPF_EQUAL,
- CMPF_NOT_EQUAL,
- CMPF_GREATER_EQUAL,
- CMPF_GREATER
- };
- /** High-level filtering options providing shortcuts to settings the
- minification, magnification and mip filters. */
- enum TextureFilterOptions
- {
- /// Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE
- TFO_NONE,
- /// Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT
- TFO_BILINEAR,
- /// Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR
- TFO_TRILINEAR,
- /// Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR
- TFO_ANISOTROPIC
- };
- enum FilterType
- {
- /// The filter used when shrinking a texture
- FT_MIN,
- /// The filter used when magnifying a texture
- FT_MAG,
- /// The filter used when determining the mipmap
- FT_MIP
- };
- /** Filtering options for textures / mipmaps. */
- enum FilterOptions
- {
- /// No filtering, used for FILT_MIP to turn off mipmapping
- FO_NONE,
- /// Use the closest pixel
- FO_POINT,
- /// Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP
- FO_LINEAR,
- /// Similar to FO_LINEAR, but compensates for the angle of the texture plane
- FO_ANISOTROPIC
- };
- /** Light shading modes. */
- enum ShadeOptions
- {
- SO_FLAT,
- SO_GOURAUD,
- SO_PHONG
- };
- /** Fog modes. */
- enum FogMode
- {
- /// No fog. Duh.
- FOG_NONE,
- /// Fog density increases exponentially from the camera (fog = 1/e^(distance * density))
- FOG_EXP,
- /// Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2)
- FOG_EXP2,
- /// Fog density increases linearly between the start and end distances
- FOG_LINEAR
- };
- /** Hardware culling modes based on vertex winding.
- This setting applies to how the hardware API culls triangles it is sent. */
- enum CullingMode
- {
- /// Hardware never culls triangles and renders everything it receives.
- CULL_NONE = 1,
- /// Hardware culls triangles whose vertices are listed clockwise in the view (default).
- CULL_CLOCKWISE = 2,
- /// Hardware culls triangles whose vertices are listed anticlockwise in the view.
- CULL_ANTICLOCKWISE = 3
- };
- /** The polygon mode to use when rasterising. */
- enum PolygonMode
- {
- /// Only points are rendered.
- PM_POINTS = 1,
- /// Wireframe models are rendered.
- PM_WIREFRAME = 2,
- /// Solid polygons are rendered.
- PM_SOLID = 3
- };
- /** An enumeration describing which material properties should track the vertex colours */
- typedef int TrackVertexColourType;
- enum TrackVertexColourEnum {
- TVC_NONE = 0x0,
- TVC_AMBIENT = 0x1,
- TVC_DIFFUSE = 0x2,
- TVC_SPECULAR = 0x4,
- TVC_EMISSIVE = 0x8
- };
- /** Defines the frame buffer types. */
- enum FrameBufferType {
- FBT_COLOUR = 0x1,
- FBT_DEPTH = 0x2,
- FBT_STENCIL = 0x4
- };
-
- /// Name / value parameter pair (first = name, second = value)
- typedef map<String, String>::type NameValuePairList;
- /// Render window creation parameters.
- struct RenderWindowDescription
- {
- String name;
- unsigned int width;
- unsigned int height;
- bool useFullScreen;
- NameValuePairList miscParams;
- };
- /// Render window creation parameters container.
- typedef vector<RenderWindowDescription>::type RenderWindowDescriptionList;
- /// Render window container.
- typedef vector<RenderWindow*>::type RenderWindowList;
-
- /** @} */
- }
- #endif
|