30 #ifndef __GLESRenderSystem_H__
31 #define __GLESRenderSystem_H__
41 class GLESGpuProgramManager;
42 class HardwareBufferManager;
90 GLfloat mAutoTextureMatrix[16];
153 GLuint getCombinedMinMipFilter(
void)
const;
157 void makeGLMatrix(GLfloat gl_matrix[16],
const Matrix4& m);
158 void setGLLight(
size_t index,
Light* lt);
161 void setGLLightPositionDirection(
Light* lt, GLenum lightindex);
164 bool activateGLTextureUnit(
size_t unit);
165 bool activateGLClientTextureUnit(
size_t unit);
166 void setGLTexEnvi(GLenum target, GLenum name, GLint param);
167 void setGLTexEnvf(GLenum target, GLenum name, GLfloat param);
168 void setGLTexEnvfv(GLenum target, GLenum name,
const GLfloat *param);
169 void setGLPointParamf(GLenum name, GLfloat param);
170 void setGLPointParamfv(GLenum name,
const GLfloat *param);
171 void setGLMaterialfv(GLenum face, GLenum name,
const GLfloat *param);
172 void setGLMatrixMode(GLenum mode);
173 void setGLDepthMask(GLboolean flag);
174 void setGLClearDepthf(GLclampf depth);
175 void setGLColorMask(
bool red,
bool green,
bool blue,
bool alpha);
176 void setGLLightf(GLenum light, GLenum name, GLfloat param);
177 void setGLLightfv(GLenum light, GLenum name,
const GLfloat *param);
190 const String& getName(
void)
const;
198 void setConfigOption(
const String &name,
const String &value);
202 String validateConfigOptions(
void);
206 RenderWindow* _initialise(
bool autoCreateWindow,
const String& windowTitle =
"OGRE Render NativeWindowType");
218 void reinitialise(
void);
226 void setAmbientLight(
float r,
float g,
float b);
234 void setLightingEnabled(
bool enabled);
237 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
244 void _getDepthStencilFormatFor( GLenum internalColourFormat, GLenum *depthFormat,
245 GLenum *stencilFormat );
257 String getErrorDescription(
long errorNumber)
const;
265 void setNormaliseNormals(
bool normalise);
273 void _useLights(
const LightList& lights,
unsigned short limit);
281 void _setWorldMatrix(
const Matrix4 &m);
285 void _setViewMatrix(
const Matrix4 &m);
289 void _setProjectionMatrix(
const Matrix4 &m);
300 void _setPointParameters(
Real size,
bool attenuationEnabled,
305 void _setPointSpritesEnabled(
bool enabled);
309 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
313 void _setTextureCoordSet(
size_t stage,
size_t index);
330 void _setTextureBorderColour(
size_t stage,
const ColourValue& colour);
334 void _setTextureMipmapBias(
size_t unit,
float bias);
338 void _setTextureMatrix(
size_t stage,
const Matrix4& xform);
346 void _beginFrame(
void);
350 void _endFrame(
void);
362 void _setDepthBufferCheckEnabled(
bool enabled =
true);
366 void _setDepthBufferWriteEnabled(
bool enabled =
true);
374 void _setDepthBias(
float constantBias,
float slopeScaleBias);
378 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
386 void _convertProjectionMatrix(
const Matrix4& matrix,
387 Matrix4& dest,
bool forGpuProgram =
false);
391 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
392 Matrix4& dest,
bool forGpuProgram =
false);
397 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
402 Matrix4& dest,
bool forGpuProgram =
false);
406 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
415 void enableClipPlane (
ushort index,
bool enable);
423 void setStencilCheckEnabled(
bool enabled);
432 bool twoSidedOperation =
false);
440 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
456 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600);
461 void clearFrameBuffer(
unsigned int buffers,
463 Real depth = 1.0f,
unsigned short stencil = 0);
465 Real getHorizontalTexelOffset(
void);
466 Real getVerticalTexelOffset(
void);
467 Real getMinimumDepthInputValue(
void);
468 Real getMaximumDepthInputValue(
void);
469 void registerThread();
470 void unregisterThread();
471 void preExtraThreadsStarted();
472 void postExtraThreadsStarted();
494 void _oneTimeContextInitialization();
507 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
514 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage );
516 unsigned int getDisplayMonitorCount()
const;
521 GLfloat _getCurrentAnisotropy(
size_t unit);
virtual void markProfileEvent(const String &eventName)
Marks an instantaneous event for graphics profilers.
Manages the target rendering window.
LightfvMap mActiveLightfvMap
GLfloat mTexMaxAnisotropy
A 'canvas' which can receive the results of a rendering operation.
GLenum mActiveCullFaceMode
virtual void beginProfileEvent(const String &eventName)
This marks the beginning of an event for GPU profiling.
GLenum mPolygonMode
OpenGL ES doesn't support setting the PolygonMode like desktop GL So we will cache the value and set ...
ushort mActiveClientTextureUnit
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
Singleton wrapper for hardware buffer manager.
GLESRTTManager * mRTTManager
Manager object for creating render textures.
PointParamfMap mActivePointParamfMap
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
unsigned int getDiscardBuffers(void)
MaterialfvMap mActiveMaterialfvMap
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
GLboolean mDepthWrite
Store last depth write state.
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.
ushort mActiveTextureUnit
These variables are used for caching RenderSystem state.
bool mGLInitialised
Check if the GL system has already been initialised.
ColourValue mActiveClearColor
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.
LightfMap mActiveLightfMap
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
GLclampf mActiveAlphaFuncValue
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Specialisation of SharedPtr to allow SharedPtr to be assigned to TexturePtr.
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.
GLenum _getPolygonMode(void)
PointParamfvMap mActivePointParamfvMap
HashMap< GLenum, const GLfloat * > LightfvMap
GLESSupport * mGLSupport
GL support class, used for creating windows etc.
uint32 mStencilMask
Store last stencil mask state.
TexEnvfMap mActiveTexEnvfMap
TexEnviMap mActiveTexEnviMap
An abstraction of a viewport, i.e.
'New' rendering operation using vertex buffers.
GLfloat mMaxTexMaxAnisotropy
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.
GLclampf mActiveClearDepth
#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.
TexEnvfvMap mActiveTexEnvfvMap
singleton class for storing the capabilities of the graphics card.
virtual void endProfileEvent(void)
Ends the currently active GPU profiling event.
HardwareBufferManager * mHardwareBufferManager
StencilOperation
Enum describing the various actions which can be taken onthe 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