Go to the documentation of this file.
29 #ifndef __GL3PlusRenderSystem_H__
30 #define __GL3PlusRenderSystem_H__
41 class GL3PlusRTTManager;
42 class GL3PlusGpuProgramManager;
43 class GLSLProgramFactory;
45 class GLSLLinkProgram;
46 class HardwareBufferManager;
84 void initConfigOptions(
void);
95 GLfloat mAutoTextureMatrix[16];
143 GLint getCombinedMinMipFilter(
void)
const;
155 bool activateGLTextureUnit(
size_t unit);
157 const size_t vertexStart,
167 friend class ShaderGeneratorTechniqueResolverListener;
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);
222 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
233 void _getDepthStencilFormatFor( GLenum internalColourFormat, GLenum *depthFormat,
234 GLenum *stencilFormat );
246 String getErrorDescription(
long errorNumber)
const;
270 void _setWorldMatrix(
const Matrix4 &m);
274 void _setViewMatrix(
const Matrix4 &m);
278 void _setProjectionMatrix(
const Matrix4 &m);
289 void _setPointParameters(
Real size,
bool attenuationEnabled,
294 void _setPointSpritesEnabled(
bool enabled);
298 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
302 void _setTextureCoordSet(
size_t stage,
size_t index);
307 const Frustum* frustum = 0) { };
319 void _setTextureBorderColour(
size_t stage,
const ColourValue& colour);
323 void _setTextureMipmapBias(
size_t unit,
float bias);
335 void _beginFrame(
void);
339 void _endFrame(
void);
351 void _setDepthBufferCheckEnabled(
bool enabled =
true);
355 void _setDepthBufferWriteEnabled(
bool enabled =
true);
363 void _setDepthBias(
float constantBias,
float slopeScaleBias);
367 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
375 void _convertProjectionMatrix(
const Matrix4& matrix,
376 Matrix4& dest,
bool forGpuProgram =
false);
380 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
381 Matrix4& dest,
bool forGpuProgram =
false);
386 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
391 Matrix4& dest,
bool forGpuProgram =
false);
395 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
404 void enableClipPlane (
ushort index,
bool enable);
412 void setStencilCheckEnabled(
bool enabled);
421 bool twoSidedOperation =
false);
429 void _setTextureUnitCompareFunction(
size_t unit,
CompareFunction function);
433 void _setTextureUnitCompareEnabled(
size_t unit,
bool compare);
437 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
457 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600);
459 void clearFrameBuffer(
unsigned int buffers,
461 Real depth = 1.0f,
unsigned short stencil = 0);
468 void registerThread();
469 void unregisterThread();
470 void preExtraThreadsStarted();
471 void postExtraThreadsStarted();
493 void _oneTimeContextInitialization();
506 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
513 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage );
515 unsigned int getDisplayMonitorCount()
const;
518 GLfloat _getCurrentAnisotropy(
size_t unit);
528 virtual void beginProfileEvent(
const String &eventName );
531 virtual void endProfileEvent(
void );
534 virtual void markProfileEvent(
const String &eventName );
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Defines the functionality of a 3D API.
GL3PlusContextList mBackgroundContextList
List of background thread contexts.
Defines a plane in 3D space.
void _setTextureCoordCalculation(size_t stage, TexCoordCalcMethod m, const Frustum *frustum=0)
See RenderSystem.
An abstract class that contains a depth/stencil buffer.
This is a abstract class that that provides the interface for the query class for hardware occlusion.
BindBufferMap mActiveBufferMap
vector< GLuint >::type mRenderInstanceAttribsBound
GL3PlusRTTManager * mRTTManager
Manager object for creating render textures.
GL3PlusGpuProgram * mCurrentVertexProgram
GLSLProgramFactory * mGLSLProgramFactory
Manages the target rendering window.
Real getVerticalTexelOffset(void)
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this r...
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
void _useLights(const LightList &lights, unsigned short limit)
See RenderSystem.
Defines a program which runs on the GPU such as a vertex or fragment program.
size_t mTextureMipmapCount
Used to store the number of mipmaps in the currently bound texture.
GL3PlusGpuProgramManager * mGpuProgramManager
void setVertexBufferBinding(VertexBufferBinding *binding)
See RenderSystem.
GLenum mPolygonMode
Cache the polygon mode value.
@ SOP_KEEP
Leave the stencil buffer unchanged.
void setVertexDeclaration(VertexDeclaration *decl, VertexBufferBinding *binding)
See RenderSystem.
GL3PlusGpuProgram * mCurrentDomainProgram
Class which manages blending of both colour and alpha components.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
void setShadingType(ShadeOptions so)
See RenderSystem.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
void setLightingEnabled(bool enabled)
See RenderSystem.
void _setTextureBlendMode(size_t stage, const LayerBlendModeEx &bm)
See RenderSystem.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
void setVertexDeclaration(VertexDeclaration *decl)
See RenderSystem.
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
bool mDepthWrite
Store last depth write state.
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.
A 'canvas' which can receive the results of a rendering operation.
map< String, ConfigOption >::type ConfigOptionMap
SceneBlendFactor
Blending factors for manually blending objects with the scene.
void _setTextureMatrix(size_t stage, const Matrix4 &xform)
See RenderSystem.
bool mUseAutoTextureMatrix
GL3PlusContext * mMainContext
GL3PlusContext * _getMainContext()
Returns the main context.
bool mStopRendering
Rendering loop control.
An abstraction of a viewport, i.e.
GL3PlusGpuProgram * mCurrentFragmentProgram
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 _OgreGL3PlusExport
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
vector< RenderWindow * >::type RenderWindowList
Render window container.
Manager/factory for RenderTextures.
GL3PlusGpuProgram * mCurrentGeometryProgram
HardwareBufferManager * mHardwareBufferManager
This class declares the usage of a single vertex buffer as a component of a complete VertexDeclaratio...
GL3PlusGpuProgram * mCurrentHullProgram
FilterOptions
Filtering options for textures / mipmaps.
Wrapper class which indicates a given angle value is in Radians.
Singleton wrapper for hardware buffer manager.
Factory class for GLSL programs.
HashMap< GLenum, GLuint > BindBufferMap
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
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...
Real getMaximumDepthInputValue(void)
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
Matrix4 mViewMatrix
View matrix to set world against.
void setNormaliseNormals(bool normalise)
See RenderSystem.
GL3PlusSupport * mGLSupport
GL support class, used for creating windows etc.
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Class representing colour.
Generalised low-level GL program, can be applied to multiple types (eg ARB and NV)
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
bool mTextureCompareEnabled
static const ColourValue Black
void setAmbientLight(float r, float g, float b)
See RenderSystem.
void _setSurfaceParams(const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking)
See RenderSystem.
ShadeOptions
Light shading modes.
GLenum _getPolygonMode(void)
GL3PlusContext * mCurrentContext
list< GL3PlusContext * >::type GL3PlusContextList
Texture addressing mode for each texture coordinate.
float Real
Software floating point type.
virtual bool hasAnisotropicMipMapFilter() const
Determines if the system has anisotropic mip map filter support.
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
Real getHorizontalTexelOffset(void)
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this...
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
Real getMinimumDepthInputValue(void)
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
GL3PlusGpuProgram * mCurrentComputeProgram
vector< Plane >::type PlaneList
PolygonMode
The polygon mode to use when rasterising.
bool mGLInitialised
Check if the GL system has already been initialised.
'New' rendering operation using vertex buffers.
Class that encapsulates an GL context.
Implementation of GL 3 as a rendering system.
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
GLenum mActiveTextureUnit
These variables are used for caching RenderSystem state.
uint32 mStencilWriteMask
Store last stencil mask state.
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