Commit 3df56aee authored by hybrid's avatar hybrid

Remove references to CImage.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3748 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2fae9894
...@@ -910,7 +910,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode) ...@@ -910,7 +910,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
// build image // build image
core::dimension2d<u32> dim = core::dimension2d<u32>( wsum, hsum ).getOptimalSize(); core::dimension2d<u32> dim = core::dimension2d<u32>( wsum, hsum ).getOptimalSize();
IImage* master = new CImage( format, dim ); IImage* master = new CImage(format, dim);
master->fill(0); master->fill(0);
video::SColor col[2]; video::SColor col[2];
...@@ -1020,7 +1020,7 @@ SHalflifeHeader* CAnimatedMeshHalfLife::loadModel(io::IReadFile* file, const io: ...@@ -1020,7 +1020,7 @@ SHalflifeHeader* CAnimatedMeshHalfLife::loadModel(io::IReadFile* file, const io:
} }
} }
IImage* image = new CImage( ECF_R8G8B8, core::dimension2d<u32>(tex[i].width, tex[i].height) ); IImage* image = SceneManager->getVideoDriver()->createImage(ECF_R8G8B8, core::dimension2d<u32>(tex[i].width, tex[i].height));
CColorConverter::convert8BitTo24Bit(src, (u8*)image->lock(), tex[i].width, tex[i].height, (u8*) palette, 0, false); CColorConverter::convert8BitTo24Bit(src, (u8*)image->lock(), tex[i].width, tex[i].height, (u8*) palette, 0, false);
image->unlock(); image->unlock();
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "os.h" #include "os.h"
#include "S3DVertex.h" #include "S3DVertex.h"
#include "CD3D8Texture.h" #include "CD3D8Texture.h"
#include "CImage.h"
#include "CD3D8MaterialRenderer.h" #include "CD3D8MaterialRenderer.h"
#include "CD3D8ShaderMaterialRenderer.h" #include "CD3D8ShaderMaterialRenderer.h"
#include "CD3D8NormalMapRenderer.h" #include "CD3D8NormalMapRenderer.h"
...@@ -2294,7 +2293,7 @@ IImage* CD3D8Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_REND ...@@ -2294,7 +2293,7 @@ IImage* CD3D8Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_REND
shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) );
// this could throw, but we aren't going to worry about that case very much // this could throw, but we aren't going to worry about that case very much
IImage* newImage = new CImage(ECF_A8R8G8B8, shotSize); IImage* newImage = createImage(ECF_A8R8G8B8, shotSize);
// d3d pads the image, so we need to copy the correct number of bytes // d3d pads the image, so we need to copy the correct number of bytes
u32* dP = (u32*)newImage->lock(); u32* dP = (u32*)newImage->lock();
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "os.h" #include "os.h"
#include "S3DVertex.h" #include "S3DVertex.h"
#include "CD3D9Texture.h" #include "CD3D9Texture.h"
#include "CImage.h"
#include "CD3D9MaterialRenderer.h" #include "CD3D9MaterialRenderer.h"
#include "CD3D9ShaderMaterialRenderer.h" #include "CD3D9ShaderMaterialRenderer.h"
#include "CD3D9NormalMapRenderer.h" #include "CD3D9NormalMapRenderer.h"
...@@ -3213,7 +3212,7 @@ IImage* CD3D9Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_REND ...@@ -3213,7 +3212,7 @@ IImage* CD3D9Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_REND
shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) );
// this could throw, but we aren't going to worry about that case very much // this could throw, but we aren't going to worry about that case very much
IImage* newImage = new CImage(ECF_A8R8G8B8, shotSize); IImage* newImage = createImage(ECF_A8R8G8B8, shotSize);
// d3d pads the image, so we need to copy the correct number of bytes // d3d pads the image, so we need to copy the correct number of bytes
u32* dP = (u32*)newImage->lock(); u32* dP = (u32*)newImage->lock();
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "irrString.h" #include "irrString.h"
#include "irrMath.h" #include "irrMath.h"
#include "dmfsupport.h" #include "dmfsupport.h"
#include "CImage.h"
namespace irr namespace irr
{ {
...@@ -285,14 +284,14 @@ IAnimatedMesh* CDMFLoader::createMesh(io::IReadFile* file) ...@@ -285,14 +284,14 @@ IAnimatedMesh* CDMFLoader::createMesh(io::IReadFile* file)
if (color.getAlpha()!=255 && materiali[i].textureBlend==4) if (color.getAlpha()!=255 && materiali[i].textureBlend==4)
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT,true); driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT,true);
video::CImage *immagine= new video::CImage(video::ECF_A8R8G8B8, video::IImage *immagine= driver->createImage(video::ECF_A8R8G8B8,
core::dimension2d<u32>(8,8)); core::dimension2d<u32>(8,8));
immagine->fill(color); immagine->fill(color);
tex = driver->addTexture("", immagine); tex = driver->addTexture("", immagine);
immagine->drop(); immagine->drop();
//to support transparent materials //to support transparent materials
if(color.getAlpha()!=255 && materiali[i].textureBlend==4) if (color.getAlpha()!=255 && materiali[i].textureBlend==4)
{ {
mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
mat.MaterialTypeParam =(((f32) (color.getAlpha()-1))/255.0f); mat.MaterialTypeParam =(((f32) (color.getAlpha()-1))/255.0f);
......
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