Go to the documentation of this file.
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 );
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
virtual bool hasAnisotropicMipMapFilter() const
Determines if the system has anisotropic mip map filter support.
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Defines the functionality of a 3D API.
Generalised low-level GL program, can be applied to multiple types (eg ARB and NV)
bool mGLInitialised
Check if the GL system has already been initialised.
Defines a plane in 3D space.
An abstract class that contains a depth/stencil buffer.
list< GLContext * >::type GLContextList
GLGpuProgramManager * mGpuProgramManager
This is a abstract class that that provides the interface for the query class for hardware occlusion.
Manages the target rendering window.
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Defines a program which runs on the GPU such as a vertex or fragment program.
Representation of a dynamic light source in the scene.
GLContext * _getMainContext()
Returns the main context.
vector< GLuint >::type mRenderInstanceAttribsBound
bool mDepthWrite
Store last depth write state.
@ SOP_KEEP
Leave the stencil buffer unchanged.
GLGpuProgram * mCurrentVertexProgram
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
Class that encapsulates an GL context.
Class which manages blending of both colour and alpha components.
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.
Implementation of GL as a rendering system.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
StencilOperation
Enum describing the various actions which can be taken on the stencil buffer.
Class encapsulating a standard 4x4 homogeneous matrix.
GLStateCacheManager * mStateCacheManager
A 'canvas' which can receive the results of a rendering operation.
An in memory cache of the OpenGL state.
map< String, ConfigOption >::type ConfigOptionMap
SceneBlendFactor
Blending factors for manually blending objects with the scene.
An abstraction of a viewport, i.e.
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.
vector< RenderWindow * >::type RenderWindowList
Render window container.
GLGpuProgram * mCurrentGeometryProgram
This class declares the usage of a single vertex buffer as a component of a complete VertexDeclaratio...
FilterOptions
Filtering options for textures / mipmaps.
Wrapper class which indicates a given angle value is in Radians.
Singleton wrapper for hardware buffer manager.
unsigned short mCurrentLights
singleton class for storing the capabilities of the graphics card.
This class represents a render target that renders to multiple RenderTextures at once.
CullingMode
Hardware culling modes based on vertex winding.
vector< GLuint >::type mRenderAttribsBound
GLSL::GLSLProgramFactory * mGLSLProgramFactory
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
GLRTTManager * mRTTManager
Manager object for creating render textures.
bool mUseAutoTextureMatrix
bool mStopRendering
Rendering loop control.
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Class representing colour.
GLSupport * getGLSupportRef()
static const ColourValue Black
ShadeOptions
Light shading modes.
HardwareBufferManager * mHardwareBufferManager
Factory class for GLSL programs.
Texture addressing mode for each texture coordinate.
Matrix4 mViewMatrix
View matrix to set world against.
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
float Real
Software floating point type.
Manager/factory for RenderTextures.
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
uint32 mStencilWriteMask
Store last stencil mask state.
GLGpuProgram * mCurrentFragmentProgram
GLContextList mBackgroundContextList
List of background thread contexts.
vector< Plane >::type PlaneList
PolygonMode
The polygon mode to use when rasterising.
'New' rendering operation using vertex buffers.
#define MAX_LIGHTS
Array of up to 8 lights, indexed as per API Note that a null value indicates a free slot.
GLContext * mCurrentContext
GLSupport * mGLSupport
GL support class, used for creating windows etc.
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
ushort mActiveTextureUnit
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15