Go to the documentation of this file.
29 #ifndef __GLES2RenderSystem_H__
30 #define __GLES2RenderSystem_H__
41 class GLES2RTTManager;
42 class GLES2GpuProgramManager;
43 class GLSLESProgramFactory;
44 class GLES2StateCacheManager;
45 #if !OGRE_NO_GLES2_CG_SUPPORT
46 class GLSLESCgProgramFactory;
48 class GLSLESGpuProgram;
49 class HardwareBufferManager;
50 #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
51 class AndroidResourceManager;
78 GLfloat mAutoTextureMatrix[16];
100 #if !OGRE_NO_GLES2_CG_SUPPORT
120 GLint getCombinedMinMipFilter(
void)
const;
128 const size_t vertexStart,
143 friend class ShaderGeneratorTechniqueResolverListener;
151 const String& getName(
void)
const;
159 void setConfigOption(
const String &name,
const String &value);
163 String validateConfigOptions(
void);
167 RenderWindow* _initialise(
bool autoCreateWindow,
const String& windowTitle =
"OGRE Render NativeWindowType");
179 void reinitialise(
void);
198 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
205 void _getDepthStencilFormatFor( GLenum internalColourFormat, GLenum *depthFormat,
206 GLenum *stencilFormat );
218 String getErrorDescription(
long errorNumber)
const;
242 void _setWorldMatrix(
const Matrix4 &m);
246 void _setViewMatrix(
const Matrix4 &m);
250 void _setProjectionMatrix(
const Matrix4 &m);
270 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
274 void _setTextureCoordSet(
size_t stage,
size_t index);
279 const Frustum* frustum = 0) { };
307 void _beginFrame(
void);
311 void _endFrame(
void);
323 void _setDepthBufferCheckEnabled(
bool enabled =
true);
327 void _setDepthBufferWriteEnabled(
bool enabled =
true);
335 void _setDepthBias(
float constantBias,
float slopeScaleBias);
339 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
347 void _convertProjectionMatrix(
const Matrix4& matrix,
348 Matrix4& dest,
bool forGpuProgram =
false);
352 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
353 Matrix4& dest,
bool forGpuProgram =
false);
358 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
363 Matrix4& dest,
bool forGpuProgram =
false);
367 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
376 void enableClipPlane (
ushort index,
bool enable);
384 void setStencilCheckEnabled(
bool enabled);
393 bool twoSidedOperation =
false);
397 void _setTextureUnitCompareFunction(
size_t unit,
CompareFunction function);
401 void _setTextureUnitCompareEnabled(
size_t unit,
bool compare);
405 virtual void _setTextureUnitFiltering(
size_t unit,
FilterOptions minFilter,
414 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
438 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600);
440 void clearFrameBuffer(
unsigned int buffers,
442 Real depth = 1.0f,
unsigned short stencil = 0);
449 void registerThread();
450 void unregisterThread();
451 void preExtraThreadsStarted();
452 void postExtraThreadsStarted();
475 void _oneTimeContextInitialization();
489 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
496 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage );
498 unsigned int getDisplayMonitorCount()
const;
501 GLfloat _getCurrentAnisotropy(
size_t unit);
506 unsigned int getDiscardBuffers(
void);
511 virtual void beginProfileEvent(
const String &eventName );
514 virtual void endProfileEvent(
void );
517 virtual void markProfileEvent(
const String &eventName );
519 #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
void _setPointSpritesEnabled(bool enabled)
See RenderSystem.
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Defines the functionality of a 3D API.
Defines a plane in 3D space.
vector< GLuint >::type mRenderAttribsBound
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.
Real getMinimumDepthInputValue(void)
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
GLES2RTTManager * mRTTManager
Manager object for creating render textures.
HardwareBufferManager * mHardwareBufferManager
void setNormaliseNormals(bool normalise)
See RenderSystem.
bool mGLInitialised
Check if the GL system has already been initialised.
Manages the target rendering window.
virtual bool hasAnisotropicMipMapFilter() const
See RenderSystem.
void setClipPlanesImpl(const Ogre::PlaneList &planeList)
Internal method used to set the underlying clip planes when needed.
Matrix4 mViewMatrix
View matrix to set world against.
GLES2Support * getGLES2Support()
Defines a program which runs on the GPU such as a vertex or fragment program.
GLSLESCgProgramFactory * mGLSLESCgProgramFactory
GLES2Context * mCurrentContext
void _useLights(const LightList &lights, unsigned short limit)
See RenderSystem.
Real getHorizontalTexelOffset(void)
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this...
GLES2Support * getGLSupportRef()
void setVertexBufferBinding(VertexBufferBinding *binding)
See RenderSystem.
@ SOP_KEEP
Leave the stencil buffer unchanged.
void _setPointParameters(Real size, bool attenuationEnabled, Real constant, Real linear, Real quadratic, Real minSize, Real maxSize)
See RenderSystem.
GLES2ContextList mBackgroundContextList
List of background thread contexts.
Class which manages blending of both colour and alpha components.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
void _setSurfaceParams(const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking)
See RenderSystem.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
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...
void _setTextureBorderColour(size_t stage, const ColourValue &colour)
See RenderSystem.
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.
void _setTextureMipmapBias(size_t unit, float bias)
See RenderSystem.
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.
An abstraction of a viewport, i.e.
GLES2GpuProgramManager * mGpuProgramManager
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.
void setAmbientLight(float r, float g, float b)
See RenderSystem.
GLSLESProgramFactory * mGLSLESProgramFactory
void setLightingEnabled(bool enabled)
See RenderSystem.
GLES2GpuProgram * mCurrentFragmentProgram
This class declares the usage of a single vertex buffer as a component of a complete VertexDeclaratio...
GLES2Support * mGLSupport
GL support class, used for creating windows etc.
FilterOptions
Filtering options for textures / mipmaps.
Wrapper class which indicates a given angle value is in Radians.
Singleton wrapper for hardware buffer manager.
singleton class for storing the capabilities of the graphics card.
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
Factory class for GLSL ES programs.
This class represents a render target that renders to multiple RenderTextures at once.
CullingMode
Hardware culling modes based on vertex winding.
list< GLES2Context * >::type GLES2ContextList
GLES2StateCacheManager * mStateCacheManager
State cache manager which responsible to reduce redundant state changes.
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
GLES2Context * mMainContext
Class that encapsulates an GL context.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
void _setTextureCoordCalculation(size_t stage, TexCoordCalcMethod m, const Frustum *frustum=0)
See RenderSystem.
Generalised low-level GL program, can be applied to multiple types (eg ARB and NV)
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Class representing colour.
Manager/factory for RenderTextures.
GLES2GpuProgram * mCurrentVertexProgram
Real getVerticalTexelOffset(void)
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this r...
void _setTextureMatrix(size_t stage, const Matrix4 &xform)
See RenderSystem.
void _setTextureBlendMode(size_t stage, const LayerBlendModeEx &bm)
See RenderSystem.
static AndroidResourceManager * mResourceManager
static const ColourValue Black
ShadeOptions
Light shading modes.
Texture addressing mode for each texture coordinate.
float Real
Software floating point type.
GLES2Context * _getMainContext()
Returns the main context.
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
void setShadingType(ShadeOptions so)
See RenderSystem.
bool mUseAutoTextureMatrix
An in memory cache of the OpenGL ES state.
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
Implementation of GL ES 2.x as a rendering system.
Factory class for GLSL ES programs.
vector< Plane >::type PlaneList
PolygonMode
The polygon mode to use when rasterising.
Real getMaximumDepthInputValue(void)
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
'New' rendering operation using vertex buffers.
vector< GLuint >::type mRenderInstanceAttribsBound
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
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