Reorder and reindent.

git-svn-id: http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4613 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2013-11-19 23:08:17 +00:00
parent 1fca8b0615
commit d240aad4cb
5 changed files with 45 additions and 45 deletions

View File

@ -44,8 +44,8 @@ COGLES2Driver::COGLES2Driver(const SIrrlichtCreationParameters& params,
, CIrrDeviceIPhone* device
#endif
) : CNullDriver(io, params.WindowSize), COGLES2ExtensionHandler(),
CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
Transformation3DChanged(true), AntiAlias(params.AntiAlias), BridgeCalls(0),
BridgeCalls(0), CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
Transformation3DChanged(true), AntiAlias(params.AntiAlias),
RenderTargetTexture(0), CurrentRendertargetSize(0, 0), ColorFormat(ECF_R8G8B8)
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_WINDOWS_API_) || defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
, ContextManager(contextManager)

View File

@ -57,11 +57,11 @@ namespace video
COGLES2Driver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_WINDOWS_API_) || defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
, IContextManager* contextManager
, IContextManager* contextManager
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
, CIrrDeviceIPhone* device
, CIrrDeviceIPhone* device
#endif
);
);
//! destructor
virtual ~COGLES2Driver();
@ -228,9 +228,9 @@ namespace video
//! Can be called by an IMaterialRenderer to make its work easier.
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, bool resetAllRenderstates);
//! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call.
virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates);
//! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call.
virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates);
//! Get a vertex shader constant index.
virtual s32 getVertexShaderConstantID(const c8* name);
@ -285,8 +285,8 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData=0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT);
s32 userData=0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT);
//! Returns pointer to the IGPUProgrammingServices interface.
virtual IGPUProgrammingServices* getGPUProgrammingServices();
@ -357,14 +357,14 @@ namespace video
GLenum getZBufferBits() const;
//! Get current material.
const SMaterial& getCurrentMaterial() const;
const SMaterial& getCurrentMaterial() const;
//! Get bridge calls.
COGLES2CallBridge* getBridgeCalls() const;
COGLES2CallBridge* getBridgeCalls() const;
private:
// Bridge calls.
COGLES2CallBridge* BridgeCalls;
COGLES2CallBridge* BridgeCalls;
void uploadClipPlane(u32 index);
@ -375,7 +375,7 @@ namespace video
virtual ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData);
//! returns a device dependent texture from a software surface (IImage)
virtual ITexture* createDeviceDependentTextureCube(const io::path& name, IImage* posXImage, IImage* negXImage,
virtual ITexture* createDeviceDependentTextureCube(const io::path& name, IImage* posXImage, IImage* negXImage,
IImage* posYImage, IImage* negYImage, IImage* posZImage, IImage* negZImage);
//! creates a transposed matrix in supplied GLfloat array to pass to OGLES1
@ -455,17 +455,17 @@ namespace video
GLuint ViewRenderbuffer;
GLuint ViewDepthRenderbuffer;
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_WINDOWS_API_) || defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
IContextManager* ContextManager;
IContextManager* ContextManager;
#endif
};
//! This bridge between Irlicht pseudo OpenGL calls
//! and true OpenGL calls.
class COGLES2CallBridge
{
public:
COGLES2CallBridge(COGLES2Driver* driver);
//! This bridge between Irlicht pseudo OpenGL calls
//! and true OpenGL calls.
class COGLES2CallBridge
{
public:
COGLES2CallBridge(COGLES2Driver* driver);
// Blending calls.
@ -478,33 +478,33 @@ namespace video
void setCullFaceFunc(GLenum mode);
void setCullFace(bool enable);
// Depth calls.
// Depth calls.
void setDepthFunc(GLenum mode);
void setDepthMask(bool enable);
void setDepthMask(bool enable);
void setDepthTest(bool enable);
// Program calls.
void setProgram(GLuint program);
// Texture calls.
void setActiveTexture(GLenum texture);
void getTexture(u32 stage, GLenum& type);
// Texture calls.
void setActiveTexture(GLenum texture);
void getTexture(u32 stage, GLenum& type);
void setTexture(u32 stage, GLenum type);
// Viewport calls.
void setViewport(const core::rect<s32>& viewport);
private:
COGLES2Driver* Driver;
private:
COGLES2Driver* Driver;
GLenum BlendSource;
GLenum BlendDestination;
@ -512,20 +512,20 @@ namespace video
GLenum CullFaceMode;
bool CullFace;
GLenum DepthFunc;
bool DepthMask;
bool DepthTest;
bool DepthMask;
bool DepthTest;
GLuint Program;
GLenum ActiveTexture;
const ITexture* Texture[MATERIAL_MAX_TEXTURES];
const ITexture* Texture[MATERIAL_MAX_TEXTURES];
GLenum TextureType[MATERIAL_MAX_TEXTURES];
core::rect<s32> Viewport;
};
};
} // end namespace video
} // end namespace irr

View File

@ -161,8 +161,8 @@ namespace video
COGLES2ExtensionHandler::COGLES2ExtensionHandler() :
Version(0), MaxTextureUnits(0), MaxSupportedTextures(0),
MaxAnisotropy(1), MaxTextureSize(1),
MaxIndices(0xffff), MaxTextureLODBias(0.f),
MaxAnisotropy(1), MaxIndices(0xffff),
MaxTextureSize(1), MaxTextureLODBias(0.f),
StencilBuffer(false)
{
for (u32 i=0; i<IRR_OGLES2_Feature_Count; ++i)

View File

@ -31,7 +31,7 @@ COGLES2MaterialRenderer::COGLES2MaterialRenderer(COGLES2Driver* driver,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData)
: Driver(driver), CallBack(callback), Program(0), Alpha(false), Blending(false), FixedBlending(false), UserData(userData)
: Driver(driver), CallBack(callback), Alpha(false), Blending(false), FixedBlending(false), Program(0), UserData(userData)
{
#ifdef _DEBUG
setDebugName("COGLES2MaterialRenderer");
@ -63,7 +63,7 @@ COGLES2MaterialRenderer::COGLES2MaterialRenderer(COGLES2Driver* driver,
COGLES2MaterialRenderer::COGLES2MaterialRenderer(COGLES2Driver* driver,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, s32 userData)
: Driver(driver), CallBack(callback), Program(0), Alpha(false), Blending(false), FixedBlending(false), UserData(userData)
: Driver(driver), CallBack(callback), Alpha(false), Blending(false), FixedBlending(false), Program(0), UserData(userData)
{
if (baseMaterial == EMT_TRANSPARENT_VERTEX_ALPHA || baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL ||
baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL_REF || baseMaterial == EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA ||

View File

@ -39,7 +39,7 @@ public:
struct SStatesCache
{
SStatesCache() : WrapU(ETC_REPEAT), WrapV(ETC_REPEAT), BilinearFilter(false),
TrilinearFilter(false), AnisotropicFilter(0), MipMapStatus(false), IsCached(false), LODBias(0)
TrilinearFilter(false), AnisotropicFilter(0), MipMapStatus(false), LODBias(0), IsCached(false)
{
}