28 #ifndef __GLRenderSystem_H__ 29 #define __GLRenderSystem_H__ 81 void initConfigOptions(
void);
82 void initInputDevices(
void);
83 void processInputDevices(
void);
85 void setGLLight(
size_t index,
Light* lt);
86 void makeGLMatrix(GLfloat gl_matrix[16],
const Matrix4& m);
108 GLfloat _getCurrentAnisotropy(
size_t unit);
114 void setGLLightPositionDirection(
Light* lt, GLenum lightindex);
117 GLfloat mAutoTextureMatrix[16];
128 GLuint getCombinedMinMipFilter(
void)
const;
160 void setClipPlanesImpl(
const PlaneList& clipPlanes);
162 const size_t vertexStart,
175 const String& getName(
void)
const;
183 void setConfigOption(
const String &name,
const String &value);
187 String validateConfigOptions(
void);
191 RenderWindow* _initialise(
bool autoCreateWindow,
const String& windowTitle =
"OGRE Render Window");
203 void reinitialise(
void);
212 void setAmbientLight(
float r,
float g,
float b);
220 void setLightingEnabled(
bool enabled);
223 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
234 void _getDepthStencilFormatFor( GLenum internalColourFormat, GLenum *depthFormat,
235 GLenum *stencilFormat );
247 String getErrorDescription(
long errorNumber)
const;
256 void setNormaliseNormals(
bool normalise);
264 void _useLights(
const LightList& lights,
unsigned short limit);
272 void _setWorldMatrix(
const Matrix4 &m);
276 void _setViewMatrix(
const Matrix4 &m);
280 void _setProjectionMatrix(
const Matrix4 &m);
291 void _setPointParameters(
Real size,
bool attenuationEnabled,
296 void _setPointSpritesEnabled(
bool enabled);
300 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
304 void _setTextureCoordSet(
size_t stage,
size_t index);
321 void _setTextureBorderColour(
size_t stage,
const ColourValue& colour);
325 void _setTextureMipmapBias(
size_t unit,
float bias);
329 void _setTextureMatrix(
size_t stage,
const Matrix4& xform);
349 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage);
357 void _beginFrame(
void);
361 void _endFrame(
void);
373 void _setDepthBufferCheckEnabled(
bool enabled =
true);
377 void _setDepthBufferWriteEnabled(
bool enabled =
true);
385 void _setDepthBias(
float constantBias,
float slopeScaleBias);
389 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
397 void _convertProjectionMatrix(
const Matrix4& matrix,
398 Matrix4& dest,
bool forGpuProgram =
false);
402 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
403 Matrix4& dest,
bool forGpuProgram =
false);
408 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
413 Matrix4& dest,
bool forGpuProgram =
false);
417 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
426 void enableClipPlane (
ushort index,
bool enable);
434 void setStencilCheckEnabled(
bool enabled);
443 bool twoSidedOperation =
false);
451 void _setTextureUnitCompareFunction(
size_t unit,
CompareFunction function);
455 void _setTextureUnitCompareEnabled(
size_t unit,
bool compare);
459 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
489 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
493 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600) ;
494 void clearFrameBuffer(
unsigned int buffers,
496 Real depth = 1.0f,
unsigned short stencil = 0);
498 Real getHorizontalTexelOffset(
void);
499 Real getVerticalTexelOffset(
void);
500 Real getMinimumDepthInputValue(
void);
501 Real getMaximumDepthInputValue(
void);
503 void registerThread();
504 void unregisterThread();
505 void preExtraThreadsStarted();
506 void postExtraThreadsStarted();
515 void _oneTimeContextInitialization();
530 void _unregisterContext(
GLContext *context);
535 unsigned int getDisplayMonitorCount()
const;
541 virtual void beginProfileEvent(
const String &eventName );
544 virtual void endProfileEvent(
void );
547 virtual void markProfileEvent(
const String &eventName );
vector< Plane >::type PlaneList
GLRTTManager * mRTTManager
Manager object for creating render textures.
A 'canvas' which can receive the results of a rendering operation.
bool mStopRendering
Rendering loop control.
vector< GLuint >::type mRenderAttribsBound
Texture addressing mode for each texture coordinate.
GLStateCacheManager * mStateCacheManager
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
Leave the stencil buffer unchanged.
GLGpuProgram * mCurrentGeometryProgram
GLSL::GLSLProgramFactory * mGLSLProgramFactory
An in memory cache of the OpenGL state.
Class representing colour.
float Real
Software floating point type.
static const ColourValue Black
HardwareBufferManager * mHardwareBufferManager
bool mUseAutoTextureMatrix
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Class that encapsulates an GL context.
Singleton wrapper for hardware buffer manager.
uint32 mStencilWriteMask
Store last stencil mask state.
An abstraction of a viewport, i.e.
GLContext * mCurrentContext
Defines a plane in 3D space.
Matrix4 mViewMatrix
View matrix to set world against.
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
vector< RenderWindow * >::type RenderWindowList
Render window container.
GLContextList mBackgroundContextList
List of background thread contexts.
virtual bool hasAnisotropicMipMapFilter() const
Determines if the system has anisotropic mip map filter support.
Factory class for GLSL programs.
Class encapsulating a standard 4x4 homogeneous matrix.
GLSupport * getGLSupportRef()
Manager/factory for RenderTextures.
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Shared pointer implementation used to share vertex buffers.
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
CullingMode
Hardware culling modes based on vertex winding.
GLSupport * mGLSupport
GL support class, used for creating windows etc.
ushort mActiveTextureUnit
GLGpuProgram * mCurrentFragmentProgram
GLGpuProgramManager * mGpuProgramManager
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Class which manages blending of both colour and alpha components.
Generalised low-level GL program, can be applied to multiple types (eg ARB and NV) ...
Implementation of GL as a rendering system.
Defines the functionality of a 3D API.
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
#define MAX_LIGHTS
Array of up to 8 lights, indexed as per API Note that a null value indicates a free slot...
map< String, ConfigOption >::type ConfigOptionMap
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
An abstract class that contains a depth/stencil buffer.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
bool mDepthWrite
Store last depth write state.
singleton class for storing the capabilities of the graphics card.
list< GLContext * >::type GLContextList
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
This class declares the usage of a single vertex buffer as a component of a complete VertexDeclaratio...
Defines a program which runs on the GPU such as a vertex or fragment program.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
FilterOptions
Filtering options for textures / mipmaps.
bool mGLInitialised
Check if the GL system has already been initialised.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
vector< GLuint >::type mRenderInstanceAttribsBound
Manages the target rendering window.
This is a abstract class that that provides the interface for the query class for hardware occlusion...
GLContext * _getMainContext()
Returns the main context.
StencilOperation
Enum describing the various actions which can be taken on the stencil buffer.
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
'New' rendering operation using vertex buffers.
ShadeOptions
Light shading modes.
PolygonMode
The polygon mode to use when rasterising.
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
GLGpuProgram * mCurrentVertexProgram
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
This class represents a render target that renders to multiple RenderTextures at once.
unsigned short mCurrentLights
Representation of a dynamic light source in the scene.
Wrapper class which indicates a given angle value is in Radians.