Commit 45a8e00f authored by cutealien's avatar cutealien

Fix a bunch of warnings (mostly about constructor initializer order)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4479 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5f4c2795
......@@ -15,7 +15,7 @@ namespace video
//! Constructor of empty image
CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size)
:Data(0), Size(size), Format(format), DeleteMemory(true), IsCompressed(false), HasMipMaps(false)
:Data(0), Size(size), Format(format), IsCompressed(false), HasMipMaps(false), DeleteMemory(true)
{
initData();
}
......@@ -24,7 +24,7 @@ CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size)
//! Constructor from raw data
CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size, void* data,
bool ownForeignMemory, bool deleteForeignMemory, bool compressed, bool mipMaps)
: Data(0), Size(size), Format(format), DeleteMemory(deleteForeignMemory), IsCompressed(compressed), HasMipMaps(mipMaps)
: Data(0), Size(size), Format(format), IsCompressed(compressed), HasMipMaps(mipMaps), DeleteMemory(deleteForeignMemory)
{
if (ownForeignMemory)
{
......
......@@ -505,11 +505,11 @@ COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceLinux* device)
: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(),
CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
BridgeCalls(0), CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
Transformation3DChanged(true), AntiAlias(params.AntiAlias),
RenderTargetTexture(0), CurrentRendertargetSize(0,0),
ColorFormat(ECF_R8G8B8), CurrentTarget(ERT_FRAME_BUFFER), Params(params),
BridgeCalls(0), X11Device(device), DeviceType(EIDT_X11)
X11Device(device), DeviceType(EIDT_X11)
{
#ifdef _DEBUG
setDebugName("COpenGLDriver");
......
......@@ -432,8 +432,6 @@ namespace video
#endif
private:
// Bridge calls.
COpenGLCallBridge* BridgeCalls;
//! clears the zbuffer and color buffer
void clearBuffers(bool backBuffer, bool zBuffer, bool stencilBuffer, SColor color);
......@@ -478,6 +476,9 @@ namespace video
void renderArray(const void* indexList, u32 primitiveCount,
scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
// Bridge calls.
COpenGLCallBridge* BridgeCalls;
core::stringw Name;
core::matrix4 Matrices[ETS_COUNT];
core::array<u8> ColorBuffer;
......
......@@ -44,7 +44,7 @@ COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(video::COpenGLDriver* drive
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData)
: Driver(driver), CallBack(callback), Program(0), Program2(0), BaseMaterial(0), UserData(userData)
: Driver(driver), CallBack(callback), BaseMaterial(0), Program(0), Program2(0), UserData(userData)
{
#ifdef _DEBUG
setDebugName("COpenGLSLMaterialRenderer");
......
......@@ -24,8 +24,8 @@ COpenGLTexture::COpenGLTexture(IImage* origImage, const io::path& name, void* mi
: ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0),
TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT),
PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), MipmapLegacyMode(true),
IsRenderTarget(false), AutomaticMipmapUpdate(false),
ReadOnlyLock(false), KeepImage(true), IsCompressed(false)
IsRenderTarget(false), IsCompressed(false), AutomaticMipmapUpdate(false),
ReadOnlyLock(false), KeepImage(true)
{
#ifdef _DEBUG
setDebugName("COpenGLTexture");
......@@ -81,8 +81,8 @@ COpenGLTexture::COpenGLTexture(const io::path& name, COpenGLDriver* driver)
: ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0),
TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT),
PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), HasMipMaps(true),
MipmapLegacyMode(true), IsRenderTarget(false), AutomaticMipmapUpdate(false),
ReadOnlyLock(false), KeepImage(true), IsCompressed(false)
MipmapLegacyMode(true), IsRenderTarget(false), IsCompressed(false),
AutomaticMipmapUpdate(false), ReadOnlyLock(false), KeepImage(true)
{
#ifdef _DEBUG
setDebugName("COpenGLTexture");
......@@ -460,10 +460,12 @@ void COpenGLTexture::uploadTexture(bool newTexture, void* mipmapData, u32 level)
AutomaticMipmapUpdate=false;
if (IsCompressed && !mipmapData)
{
if (image->hasMipMaps())
mipmapData = static_cast<u8*>(image->lock())+compressedDataSize;
else
HasMipMaps = false;
}
regenerateMipMapLevels(mipmapData);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment