diff options
Diffstat (limited to 'source/Irrlicht/CNullDriver.cpp')
-rw-r--r-- | source/Irrlicht/CNullDriver.cpp | 211 |
1 files changed, 4 insertions, 207 deletions
diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index 775a22c..a76dbec 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -32,57 +32,15 @@ IImageLoader* createImageLoaderJPG(); //! creates a loader which is able to load targa images
IImageLoader* createImageLoaderTGA();
-//! creates a loader which is able to load psd images
-IImageLoader* createImageLoaderPSD();
-
-//! creates a loader which is able to load psd images
-IImageLoader* createImageLoaderPVR();
-
-//! creates a loader which is able to load dds images
-IImageLoader* createImageLoaderDDS();
-
-//! creates a loader which is able to load pcx images
-IImageLoader* createImageLoaderPCX();
-
//! creates a loader which is able to load png images
IImageLoader* createImageLoaderPNG();
-//! creates a loader which is able to load WAL images
-IImageLoader* createImageLoaderWAL();
-
-//! creates a loader which is able to load halflife images
-IImageLoader* createImageLoaderHalfLife();
-
-//! creates a loader which is able to load lmp images
-IImageLoader* createImageLoaderLMP();
-
-//! creates a loader which is able to load ppm/pgm/pbm images
-IImageLoader* createImageLoaderPPM();
-
-//! creates a loader which is able to load rgb images
-IImageLoader* createImageLoaderRGB();
-
-
-//! creates a writer which is able to save bmp images
-IImageWriter* createImageWriterBMP();
-
//! creates a writer which is able to save jpg images
IImageWriter* createImageWriterJPG();
-//! creates a writer which is able to save tga images
-IImageWriter* createImageWriterTGA();
-
-//! creates a writer which is able to save psd images
-IImageWriter* createImageWriterPSD();
-
-//! creates a writer which is able to save pcx images
-IImageWriter* createImageWriterPCX();
-
//! creates a writer which is able to save png images
IImageWriter* createImageWriterPNG();
-//! creates a writer which is able to save ppm images
-IImageWriter* createImageWriterPPM();
//! constructor
CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize)
@@ -95,8 +53,8 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre #endif
DriverAttributes = new io::CAttributes();
- DriverAttributes->addInt("MaxTextures", _IRR_MATERIAL_MAX_TEXTURES_);
- DriverAttributes->addInt("MaxSupportedTextures", _IRR_MATERIAL_MAX_TEXTURES_);
+ DriverAttributes->addInt("MaxTextures", MATERIAL_MAX_TEXTURES);
+ DriverAttributes->addInt("MaxSupportedTextures", MATERIAL_MAX_TEXTURES);
DriverAttributes->addInt("MaxAnisotropy", 1);
// DriverAttributes->addInt("MaxUserClipPlanes", 0);
// DriverAttributes->addInt("MaxAuxBuffers", 0);
@@ -124,68 +82,14 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre if (FileSystem)
FileSystem->grab();
- // create surface loader
-
-#ifdef _IRR_COMPILE_WITH_WAL_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderHalfLife());
- SurfaceLoader.push_back(video::createImageLoaderWAL());
-#endif
-#ifdef _IRR_COMPILE_WITH_LMP_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderLMP());
-#endif
-#ifdef _IRR_COMPILE_WITH_PPM_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderPPM());
-#endif
-#ifdef _IRR_COMPILE_WITH_RGB_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderRGB());
-#endif
-#ifdef _IRR_COMPILE_WITH_PSD_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderPSD());
-#endif
-#ifdef _IRR_COMPILE_WITH_PVR_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderPVR());
-#endif
-#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_DECODER_LOADER_)
- SurfaceLoader.push_back(video::createImageLoaderDDS());
-#endif
-#ifdef _IRR_COMPILE_WITH_PCX_LOADER_
- SurfaceLoader.push_back(video::createImageLoaderPCX());
-#endif
-#ifdef _IRR_COMPILE_WITH_TGA_LOADER_
+ // create surface loaders and writers
SurfaceLoader.push_back(video::createImageLoaderTGA());
-#endif
-#ifdef _IRR_COMPILE_WITH_PNG_LOADER_
SurfaceLoader.push_back(video::createImageLoaderPNG());
-#endif
-#ifdef _IRR_COMPILE_WITH_JPG_LOADER_
SurfaceLoader.push_back(video::createImageLoaderJPG());
-#endif
-#ifdef _IRR_COMPILE_WITH_BMP_LOADER_
SurfaceLoader.push_back(video::createImageLoaderBMP());
-#endif
-
-
-#ifdef _IRR_COMPILE_WITH_PPM_WRITER_
- SurfaceWriter.push_back(video::createImageWriterPPM());
-#endif
-#ifdef _IRR_COMPILE_WITH_PCX_WRITER_
- SurfaceWriter.push_back(video::createImageWriterPCX());
-#endif
-#ifdef _IRR_COMPILE_WITH_PSD_WRITER_
- SurfaceWriter.push_back(video::createImageWriterPSD());
-#endif
-#ifdef _IRR_COMPILE_WITH_TGA_WRITER_
- SurfaceWriter.push_back(video::createImageWriterTGA());
-#endif
-#ifdef _IRR_COMPILE_WITH_JPG_WRITER_
+
SurfaceWriter.push_back(video::createImageWriterJPG());
-#endif
-#ifdef _IRR_COMPILE_WITH_PNG_WRITER_
SurfaceWriter.push_back(video::createImageWriterPNG());
-#endif
-#ifdef _IRR_COMPILE_WITH_BMP_WRITER_
- SurfaceWriter.push_back(video::createImageWriterBMP());
-#endif
// set ExposedData to 0
@@ -815,27 +719,6 @@ void CNullDriver::draw3DLine(const core::vector3df& start, }
-//! Draws a 3d triangle.
-void CNullDriver::draw3DTriangle(const core::triangle3df& triangle, SColor color)
-{
- S3DVertex vertices[3];
- vertices[0].Pos=triangle.pointA;
- vertices[0].Color=color;
- vertices[0].Normal=triangle.getNormal().normalize();
- vertices[0].TCoords.set(0.f,0.f);
- vertices[1].Pos=triangle.pointB;
- vertices[1].Color=color;
- vertices[1].Normal=vertices[0].Normal;
- vertices[1].TCoords.set(0.5f,1.f);
- vertices[2].Pos=triangle.pointC;
- vertices[2].Color=color;
- vertices[2].Normal=vertices[0].Normal;
- vertices[2].TCoords.set(1.f,0.f);
- const u16 indexList[] = {0,1,2};
- drawVertexPrimitiveList(vertices, 3, indexList, 1, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
-}
-
-
//! Draws a 3d axis aligned box.
void CNullDriver::draw3DBox(const core::aabbox3d<f32>& box, SColor color)
{
@@ -875,31 +758,6 @@ void CNullDriver::draw2DImage(const video::ITexture* texture, const core::positi }
-
-//! draws a set of 2d images, using a color and the alpha channel of the
-//! texture if desired. The images are drawn beginning at pos and concatenated
-//! in one line. All drawings are clipped against clipRect (if != 0).
-//! The subtextures are defined by the array of sourceRects and are chosen
-//! by the indices given.
-void CNullDriver::draw2DImageBatch(const video::ITexture* texture,
- const core::position2d<s32>& pos,
- const core::array<core::rect<s32> >& sourceRects,
- const core::array<s32>& indices,
- s32 kerningWidth,
- const core::rect<s32>* clipRect, SColor color,
- bool useAlphaChannelOfTexture)
-{
- core::position2d<s32> target(pos);
-
- for (u32 i=0; i<indices.size(); ++i)
- {
- draw2DImage(texture, target, sourceRects[indices[i]],
- clipRect, color, useAlphaChannelOfTexture);
- target.X += sourceRects[indices[i]].getWidth();
- target.X += kerningWidth;
- }
-}
-
//! draws a set of 2d images, using a color and the alpha channel of the
//! texture if desired.
void CNullDriver::draw2DImageBatch(const video::ITexture* texture,
@@ -940,16 +798,6 @@ void CNullDriver::draw2DImage(const video::ITexture* texture, const core::positi }
-//! Draws the outline of a 2d rectangle
-void CNullDriver::draw2DRectangleOutline(const core::recti& pos, SColor color)
-{
- draw2DLine(pos.UpperLeftCorner, core::position2di(pos.LowerRightCorner.X, pos.UpperLeftCorner.Y), color);
- draw2DLine(core::position2di(pos.LowerRightCorner.X, pos.UpperLeftCorner.Y), pos.LowerRightCorner, color);
- draw2DLine(pos.LowerRightCorner, core::position2di(pos.UpperLeftCorner.X, pos.LowerRightCorner.Y), color);
- draw2DLine(core::position2di(pos.UpperLeftCorner.X, pos.LowerRightCorner.Y), pos.UpperLeftCorner, color);
-}
-
-
//! Draw a 2d rectangle
void CNullDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos, const core::rect<s32>* clip)
{
@@ -973,38 +821,6 @@ void CNullDriver::draw2DLine(const core::position2d<s32>& start, {
}
-//! Draws a pixel
-void CNullDriver::drawPixel(u32 x, u32 y, const SColor & color)
-{
-}
-
-
-//! Draws a non filled concyclic regular 2d polygon.
-void CNullDriver::draw2DPolygon(core::position2d<s32> center,
- f32 radius, video::SColor color, s32 count)
-{
- if (count < 2)
- return;
-
- core::position2d<s32> first;
- core::position2d<s32> a,b;
-
- for (s32 j=0; j<count; ++j)
- {
- b = a;
-
- f32 p = j / (f32)count * (core::PI*2);
- a = center + core::position2d<s32>((s32)(sin(p)*radius), (s32)(cos(p)*radius));
-
- if (j==0)
- first = a;
- else
- draw2DLine(a, b, color);
- }
-
- draw2DLine(a, first, color);
-}
-
//! returns color format
ECOLOR_FORMAT CNullDriver::getColorFormat() const
@@ -1075,25 +891,6 @@ const wchar_t* CNullDriver::getName() const }
-
-//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do
-//! this: First, draw all geometry. Then use this method, to draw the shadow
-//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow.
-void CNullDriver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible)
-{
-}
-
-
-//! Fills the stencil shadow with color. After the shadow volume has been drawn
-//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this
-//! to draw the color of the shadow.
-void CNullDriver::drawStencilShadow(bool clearStencilBuffer,
- video::SColor leftUpEdge, video::SColor rightUpEdge,
- video::SColor leftDownEdge, video::SColor rightDownEdge)
-{
-}
-
-
//! Creates a boolean alpha channel of the texture based of an color key.
void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
video::SColor color,
|