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
virtual void markProfileEvent(const String &eventName)
Marks an instantaneous event for graphics profilers.
Manages the target rendering window.
A 'canvas' which can receive the results of a rendering operation.
virtual void beginProfileEvent(const String &eventName)
This marks the beginning of an event for GPU profiling.
Class encapsulating a standard 4x4 homogeneous matrix.
HashMap< GLenum, const GLfloat * > MaterialfvMap
float Real
Software floating point type.
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
HashMap< GLenum, GLint > TexEnviMap
An in memory cache of the OpenGL ES state.
Singleton wrapper for hardware buffer manager.
GLESRTTManager * mRTTManager
Manager object for creating render textures.
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
unsigned int getDiscardBuffers(void)
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Defines a plane in 3D space.
Leave the stencil buffer unchanged.
GLESContext * _getMainContext()
Returns the main context.
HashMap< GLenum, const GLfloat * > PointParamfvMap
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
Class representing colour.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Defines a program which runs on the GPU such as a vertex or fragment program.
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
bool mGLInitialised
Check if the GL system has already been initialised.
GLESGpuProgramManager * mGpuProgramManager
SceneBlendFactor
Blending factors for manually blending objects with the scene.
bool mUseAutoTextureMatrix
HashMap< GLenum, GLfloat > PointParamfMap
CullingMode
Hardware culling modes based on vertex winding.
This class represents a render target that renders to multiple RenderTextures at once.
This is a abstract class that that provides the interface for the query class for hardware occlusion...
Matrix4 mViewMatrix
View matrix to set world against.
Representation of a dynamic light source in the scene.
vector< Plane >::type PlaneList
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Manager/factory for RenderTextures.
An abstract class that contains a depth/stencil buffer.
ShadeOptions
Light shading modes.
GLESContext * mMainContext
Class that encapsulates an GL context.
void _setDiscardBuffers(unsigned int flags)
GLESContext * mCurrentContext
Texture addressing mode for each texture coordinate.
map< String, ConfigOption >::type ConfigOptionMap
GLESStateCacheManager * mStateCacheManager
State cache manager which responsible to reduce redundant state changes.
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
unsigned int mDiscardBuffers
Mask of buffers who contents can be discarded if GL_EXT_discard_framebuffer is supported.
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
HashMap< GLenum, const GLfloat * > LightfvMap
GLESSupport * mGLSupport
GL support class, used for creating windows etc.
virtual bool hasAnisotropicMipMapFilter() const
See RenderSystem.
An abstraction of a viewport, i.e.
'New' rendering operation using vertex buffers.
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Implementation of GL as a rendering system.
#define MAX_LIGHTS
Array of up to 8 lights, indexed as per API Note that a null value indicates a free slot...
Wrapper class which indicates a given angle value is in Radians.
unsigned short mCurrentLights
PolygonMode
The polygon mode to use when rasterising.
static const ColourValue Black
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
singleton class for storing the capabilities of the graphics card.
static AndroidResourceManager * mResourceManager
virtual void endProfileEvent(void)
Ends the currently active GPU profiling event.
HardwareBufferManager * mHardwareBufferManager
StencilOperation
Enum describing the various actions which can be taken on the stencil buffer.
FilterOptions
Filtering options for textures / mipmaps.
Defines the functionality of a 3D API.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
FilterOptions mMinFilter
Last min & mip filtering options, so we can combine them.
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Class which manages blending of both colour and alpha components.
HashMap< GLenum, GLfloat > TexEnvfMap
HashMap< GLenum, const GLfloat * > TexEnvfvMap
HashMap< GLenum, GLfloat > LightfMap