30 #ifndef __GLESRenderSystem_H__
31 #define __GLESRenderSystem_H__
42 class GLESGpuProgramManager;
43 class HardwareBufferManager;
90 GLfloat mAutoTextureMatrix[16];
128 GLuint getCombinedMinMipFilter(
void)
const;
132 void makeGLMatrix(GLfloat gl_matrix[16],
const Matrix4& m);
133 void setGLLight(
size_t index,
Light* lt);
136 void setGLLightPositionDirection(
Light* lt, GLenum lightindex);
139 bool activateGLTextureUnit(
size_t unit);
152 const String& getName(
void)
const;
160 void setConfigOption(
const String &name,
const String &value);
164 String validateConfigOptions(
void);
168 RenderWindow* _initialise(
bool autoCreateWindow,
const String& windowTitle =
"OGRE Render NativeWindowType");
180 void reinitialise(
void);
188 void setAmbientLight(
float r,
float g,
float b);
196 void setLightingEnabled(
bool enabled);
199 RenderWindow* _createRenderWindow(
const String &name,
unsigned int width,
unsigned int height,
212 String getErrorDescription(
long errorNumber)
const;
220 void setNormaliseNormals(
bool normalise);
228 void _useLights(
const LightList& lights,
unsigned short limit);
236 void _setWorldMatrix(
const Matrix4 &m);
240 void _setViewMatrix(
const Matrix4 &m);
244 void _setProjectionMatrix(
const Matrix4 &m);
255 void _setPointParameters(
Real size,
bool attenuationEnabled,
260 void _setPointSpritesEnabled(
bool enabled);
264 void _setTexture(
size_t unit,
bool enabled,
const TexturePtr &tex);
268 void _setTextureCoordSet(
size_t stage,
size_t index);
285 void _setTextureBorderColour(
size_t stage,
const ColourValue& colour);
289 void _setTextureMipmapBias(
size_t unit,
float bias);
293 void _setTextureMatrix(
size_t stage,
const Matrix4& xform);
301 void _beginFrame(
void);
305 void _endFrame(
void);
317 void _setDepthBufferCheckEnabled(
bool enabled =
true);
321 void _setDepthBufferWriteEnabled(
bool enabled =
true);
329 void _setDepthBias(
float constantBias,
float slopeScaleBias);
333 void _setColourBufferWriteEnabled(
bool red,
bool green,
bool blue,
bool alpha);
341 void _convertProjectionMatrix(
const Matrix4& matrix,
342 Matrix4& dest,
bool forGpuProgram =
false);
346 void _makeProjectionMatrix(
const Radian& fovy,
Real aspect,
Real nearPlane,
Real farPlane,
347 Matrix4& dest,
bool forGpuProgram =
false);
352 Real nearPlane,
Real farPlane,
Matrix4& dest,
bool forGpuProgram =
false);
357 Matrix4& dest,
bool forGpuProgram =
false);
361 void _applyObliqueDepthProjection(
Matrix4& matrix,
const Plane& plane,
370 void enableClipPlane (
ushort index,
bool enable);
378 void setStencilCheckEnabled(
bool enabled);
387 bool twoSidedOperation =
false);
395 void _setTextureLayerAnisotropy(
size_t unit,
unsigned int maxAnisotropy);
411 void setScissorTest(
bool enabled,
size_t left = 0,
size_t top = 0,
size_t right = 800,
size_t bottom = 600);
414 void clearFrameBuffer(
unsigned int buffers,
416 Real depth = 1.0f,
unsigned short stencil = 0);
418 Real getHorizontalTexelOffset(
void);
419 Real getVerticalTexelOffset(
void);
420 Real getMinimumDepthInputValue(
void);
421 Real getMaximumDepthInputValue(
void);
422 void registerThread();
423 void unregisterThread();
424 void preExtraThreadsStarted();
425 void postExtraThreadsStarted();
447 void _oneTimeContextInitialization();
460 void bindGpuProgramPassIterationParameters(
GpuProgramType gptype);
467 void _setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverage );
469 unsigned int getDisplayMonitorCount()
const;
474 GLfloat _getCurrentAnisotropy(
size_t unit);
Manages the target rendering window.
A 'canvas' which can receive the results of a rendering operation.
GLenum mPolygonMode
OpenGL ES doesn't support setting the PolygonMode like desktop GL So we will cache the value and set ...
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
bool areFixedFunctionLightsInViewSpace() const
See RenderSystem.
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...
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.
unsigned short mFixedFunctionTextureUnits
Number of fixed-function texture units.
Class representing colour.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
size_t mTextureMipmapCount
Used to store the number of mipmaps in the currently bound texture.
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.
bool mDepthWrite
Store last depth write state.
GLESGpuProgramManager * mGpuProgramManager
SceneBlendFactor
Blending factors for manually blending objects with the scene.
bool mUseAutoTextureMatrix
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.
ShadeOptions
Light shading modes.
GLESContext * mMainContext
Class that encapsulates an GL context.
GLESContext * mCurrentContext
Texture addressing mode for each texture coordinate.
map< String, ConfigOption >::type ConfigOptionMap
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Specialisation of SharedPtr to allow SharedPtr to be assigned to TexturePtr.
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
GLenum _getPolygonMode(void)
GLESSupport * mGLSupport
GL support class, used for creating windows etc.
uint32 mStencilMask
Store last stencil mask state.
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.
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.