Go to the documentation of this file.
30 #ifndef __GLESRenderSystem_H__
31 #define __GLESRenderSystem_H__
40 class GLESGpuProgramManager;
41 class HardwareBufferManager;
42 class GLESStateCacheManager;
43 #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
44 class AndroidResourceManager;
83 GLfloat mAutoTextureMatrix[16];
116 GLuint getCombinedMinMipFilter(
void)
const;
120 void makeGLMatrix(GLfloat gl_matrix[16],
const Matrix4& m);
121 void setGLLight(
size_t index,
Light* lt);
124 void setGLLightPositionDirection(
Light* lt, GLenum lightindex);
127 bool activateGLTextureUnit(
size_t unit);
128 bool activateGLClientTextureUnit(
size_t unit);
143 const String& getName(
void)
const;
151 void setConfigOption(
const String &name,
const String &value);
155 String validateConfigOptions(
void);
159 RenderWindow* _initialise(
bool autoCreateWindow,
const String& windowTitle =
"OGRE Render NativeWindowType");
171 void reinitialise(
void);
179 void setAmbientLight(
float r,
float g,
float b);
187 void setLightingEnabled(
bool enabled);
190 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
197 void _getDepthStencilFormatFor( GLenum internalColourFormat, GLenum *depthFormat,
198 GLenum *stencilFormat );
210 String getErrorDescription(
long errorNumber)
const;
218 void setNormaliseNormals(
bool normalise);
226 void _useLights(
const LightList& lights,
unsigned short limit);
234 void _setWorldMatrix(
const Matrix4 &m);
238 void _setViewMatrix(
const Matrix4 &m);
242 void _setProjectionMatrix(
const Matrix4 &m);
253 void _setPointParameters(
Real size,
bool attenuationEnabled,
258 void _setPointSpritesEnabled(
bool enabled);
262 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
266 void _setTextureCoordSet(
size_t stage,
size_t index);
283 void _setTextureBorderColour(
size_t stage,
const ColourValue& colour);
287 void _setTextureMipmapBias(
size_t unit,
float bias);
291 void _setTextureMatrix(
size_t stage,
const Matrix4& xform);
299 void _beginFrame(
void);
303 void _endFrame(
void);
315 void _setDepthBufferCheckEnabled(
bool enabled =
true);
319 void _setDepthBufferWriteEnabled(
bool enabled =
true);
327 void _setDepthBias(
float constantBias,
float slopeScaleBias);
331 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
339 void _convertProjectionMatrix(
const Matrix4& matrix,
340 Matrix4& dest,
bool forGpuProgram =
false);
344 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
345 Matrix4& dest,
bool forGpuProgram =
false);
350 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
355 Matrix4& dest,
bool forGpuProgram =
false);
359 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
368 void enableClipPlane (
ushort index,
bool enable);
376 void setStencilCheckEnabled(
bool enabled);
385 bool twoSidedOperation =
false);
389 void _setTextureUnitCompareFunction(
size_t unit,
CompareFunction function);
393 virtual void _setTextureUnitFiltering(
size_t unit,
FilterOptions minFilter,
398 void _setTextureUnitCompareEnabled(
size_t unit,
bool compare);
406 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
426 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600);
431 void clearFrameBuffer(
unsigned int buffers,
433 Real depth = 1.0f,
unsigned short stencil = 0);
435 Real getHorizontalTexelOffset(
void);
436 Real getVerticalTexelOffset(
void);
437 Real getMinimumDepthInputValue(
void);
438 Real getMaximumDepthInputValue(
void);
439 void registerThread();
440 void unregisterThread();
441 void preExtraThreadsStarted();
442 void postExtraThreadsStarted();
464 void _oneTimeContextInitialization();
477 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
484 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage );
486 unsigned int getDisplayMonitorCount()
const;
489 GLfloat _getCurrentAnisotropy(
size_t unit);
505 #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
GLESStateCacheManager * mStateCacheManager
State cache manager which responsible to reduce redundant state changes.
HashMap< GLenum, GLfloat > TexEnvfMap
HardwareBufferManager * mHardwareBufferManager
HashMap< GLenum, const GLfloat * > TexEnvfvMap
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
Defines the functionality of a 3D API.
GLESGpuProgramManager * mGpuProgramManager
void _setDiscardBuffers(unsigned int flags)
Defines a plane in 3D space.
An abstract class that contains a depth/stencil buffer.
An in memory cache of the OpenGL ES state.
This is a abstract class that that provides the interface for the query class for hardware occlusion.
GLESContext * mMainContext
unsigned short mCurrentLights
virtual void beginProfileEvent(const String &eventName)
This marks the beginning of an event for GPU profiling.
Manages the target rendering window.
Defines a program which runs on the GPU such as a vertex or fragment program.
Representation of a dynamic light source in the scene.
bool mGLInitialised
Check if the GL system has already been initialised.
#define MAX_LIGHTS
Array of up to 8 lights, indexed as per API Note that a null value indicates a free slot.
bool mUseAutoTextureMatrix
@ SOP_KEEP
Leave the stencil buffer unchanged.
virtual void endProfileEvent(void)
Ends the currently active GPU profiling event.
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.
HashMap< GLenum, GLfloat > LightfMap
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.
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.
Implementation of GL as a rendering system.
Matrix4 mViewMatrix
View matrix to set world against.
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...
GLESRTTManager * mRTTManager
Manager object for creating render textures.
Manager/factory for RenderTextures.
FilterOptions
Filtering options for textures / mipmaps.
Wrapper class which indicates a given angle value is in Radians.
HashMap< GLenum, GLint > TexEnviMap
Singleton wrapper for hardware buffer manager.
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.
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...
HashMap< GLenum, const GLfloat * > PointParamfvMap
GLESSupport * mGLSupport
GL support class, used for creating windows etc.
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
unsigned int getDiscardBuffers(void)
Class that encapsulates an GL context.
unsigned int mDiscardBuffers
Mask of buffers who contents can be discarded if GL_EXT_discard_framebuffer is supported.
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
virtual bool hasAnisotropicMipMapFilter() const
See RenderSystem.
Class representing colour.
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
static const ColourValue Black
ShadeOptions
Light shading modes.
HashMap< GLenum, const GLfloat * > LightfvMap
Texture addressing mode for each texture coordinate.
float Real
Software floating point type.
HashMap< GLenum, GLfloat > PointParamfMap
HashMap< GLenum, const GLfloat * > MaterialfvMap
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
GLESContext * mCurrentContext
static AndroidResourceManager * mResourceManager
GLESContext * _getMainContext()
Returns the main context.
virtual void markProfileEvent(const String &eventName)
Marks an instantaneous event for graphics profilers.
vector< Plane >::type PlaneList
PolygonMode
The polygon mode to use when rasterising.
'New' rendering operation using vertex buffers.
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