]> git.lizzy.rs Git - irrlicht.git/commitdiff
Remove leftover code from software rendering
authorsfan5 <sfan5@live.de>
Mon, 2 Jan 2023 20:21:53 +0000 (21:21 +0100)
committersfan5 <sfan5@live.de>
Mon, 2 Jan 2023 20:21:53 +0000 (21:21 +0100)
15 files changed:
source/Irrlicht/Android/CIrrDeviceAndroid.cpp
source/Irrlicht/Android/CIrrDeviceAndroid.h
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/CIrrDeviceLinux.h
source/Irrlicht/CIrrDeviceOSX.h
source/Irrlicht/CIrrDeviceOSX.mm
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/CIrrDeviceSDL.h
source/Irrlicht/CIrrDeviceStub.h
source/Irrlicht/CIrrDeviceWin32.cpp
source/Irrlicht/CIrrDeviceWin32.h
source/Irrlicht/CIrrDeviceiOS.h
source/Irrlicht/CIrrDeviceiOS.mm
source/Irrlicht/CNullDriver.h
source/Irrlicht/IImagePresenter.h [deleted file]

index 55668a262a98521fe78290b2b40a25f0bd23b122..43c5b0f3f73fcbd87bc1663255a99aed31dc95f4 100644 (file)
@@ -180,11 +180,6 @@ void CIrrDeviceAndroid::setWindowCaption(const wchar_t* text)
 {\r
 }\r
 \r
-bool CIrrDeviceAndroid::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip)\r
-{\r
-       return true;\r
-}\r
-\r
 bool CIrrDeviceAndroid::isWindowActive() const\r
 {\r
        return (Focused && !Paused);\r
index b29a26e8774a48b4e5eaa794fa5ebf868bfe6c13..a1f13c3a411d7bb0fcde87a4481fc3cad7b057a5 100644 (file)
@@ -11,7 +11,6 @@
 \r
 #include "CIrrDeviceStub.h"\r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 #include "ICursorControl.h"\r
 \r
 #include <android/sensor.h>\r
@@ -19,7 +18,7 @@
 \r
 namespace irr\r
 {\r
-       class CIrrDeviceAndroid : public CIrrDeviceStub, video::IImagePresenter\r
+       class CIrrDeviceAndroid : public CIrrDeviceStub\r
        {\r
        public:\r
                CIrrDeviceAndroid(const SIrrlichtCreationParameters& param);\r
@@ -34,8 +33,6 @@ namespace irr
 \r
                virtual void setWindowCaption(const wchar_t* text);\r
 \r
-               virtual bool present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip);\r
-\r
                virtual bool isWindowActive() const;\r
 \r
                virtual bool isWindowFocused() const;\r
index d500af061bb9ff6b04524716a5bec14cb3c36b4c..91d1e4700b0602dabd222a1596574cc47712cc5b 100644 (file)
@@ -110,7 +110,7 @@ namespace irr
 CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)\r
        : CIrrDeviceStub(param),\r
 #ifdef _IRR_COMPILE_WITH_X11_\r
-       XDisplay(0), VisualInfo(0), Screennr(0), XWindow(0), StdHints(0), SoftwareImage(0),\r
+       XDisplay(0), VisualInfo(0), Screennr(0), XWindow(0), StdHints(0),\r
        XInputMethod(0), XInputContext(0),\r
        HasNetWM(false),\r
 #endif\r
@@ -211,9 +211,6 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
                        ContextManager->destroySurface();\r
                }\r
 \r
-               if (SoftwareImage)\r
-                       XDestroyImage(SoftwareImage);\r
-\r
                if (!ExternalWindow)\r
                {\r
                        XDestroyWindow(XDisplay,XWindow);\r
@@ -487,21 +484,6 @@ bool CIrrDeviceLinux::createWindow()
        long num;\r
        XGetWMNormalHints(XDisplay, XWindow, StdHints, &num);\r
 \r
-       // create an XImage for the software renderer\r
-       //(thx to Nadav for some clues on how to do that!)\r
-\r
-       if (CreationParams.DriverType == video::EDT_SOFTWARE || CreationParams.DriverType == video::EDT_BURNINGSVIDEO)\r
-       {\r
-               SoftwareImage = XCreateImage(XDisplay,\r
-                       VisualInfo->visual, VisualInfo->depth,\r
-                       ZPixmap, 0, 0, Width, Height,\r
-                       BitmapPad(XDisplay), 0);\r
-\r
-               // use malloc because X will free it later on\r
-               if (SoftwareImage)\r
-                       SoftwareImage->data = (char*) malloc(SoftwareImage->bytes_per_line * SoftwareImage->height * sizeof(char));\r
-       }\r
-\r
        initXInput2();\r
 \r
 #endif // #ifdef _IRR_COMPILE_WITH_X11_\r
@@ -515,20 +497,6 @@ void CIrrDeviceLinux::createDriver()
        switch(CreationParams.DriverType)\r
        {\r
 #ifdef _IRR_COMPILE_WITH_X11_\r
-       case video::EDT_SOFTWARE:\r
-#ifdef _IRR_COMPILE_WITH_SOFTWARE_\r
-               VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this);\r
-#else\r
-               os::Printer::log("No Software driver support compiled in.", ELL_ERROR);\r
-#endif\r
-               break;\r
-       case video::EDT_BURNINGSVIDEO:\r
-#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_\r
-               VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this);\r
-#else\r
-               os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);\r
-#endif\r
-               break;\r
        case video::EDT_OPENGL:\r
 #ifdef _IRR_COMPILE_WITH_OPENGL_\r
                {\r
@@ -765,21 +733,6 @@ bool CIrrDeviceLinux::run()
                                        Width = event.xconfigure.width;\r
                                        Height = event.xconfigure.height;\r
 \r
-                                       // resize image data\r
-                                       if (SoftwareImage)\r
-                                       {\r
-                                               XDestroyImage(SoftwareImage);\r
-\r
-                                               SoftwareImage = XCreateImage(XDisplay,\r
-                                                       VisualInfo->visual, VisualInfo->depth,\r
-                                                       ZPixmap, 0, 0, Width, Height,\r
-                                                       BitmapPad(XDisplay), 0);\r
-\r
-                                               // use malloc because X will free it later on\r
-                                               if (SoftwareImage)\r
-                                                       SoftwareImage->data = (char*) malloc(SoftwareImage->bytes_per_line * SoftwareImage->height * sizeof(char));\r
-                                       }\r
-\r
                                        if (VideoDriver)\r
                                                VideoDriver->OnResize(core::dimension2d<u32>(Width, Height));\r
                                }\r
@@ -1219,60 +1172,6 @@ void CIrrDeviceLinux::setWindowCaption(const wchar_t* text)
 }\r
 \r
 \r
-//! presents a surface in the client area\r
-bool CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* srcRect)\r
-{\r
-#ifdef _IRR_COMPILE_WITH_X11_\r
-       // this is only necessary for software drivers.\r
-       if (!SoftwareImage)\r
-               return true;\r
-\r
-       // thx to Nadav, who send me some clues of how to display the image\r
-       // to the X Server.\r
-\r
-       const u32 destwidth = SoftwareImage->width;\r
-       const u32 minWidth = core::min_(image->getDimension().Width, destwidth);\r
-       const u32 destPitch = SoftwareImage->bytes_per_line;\r
-\r
-       video::ECOLOR_FORMAT destColor;\r
-       switch (SoftwareImage->bits_per_pixel)\r
-       {\r
-               case 16:\r
-                       if (SoftwareImage->depth==16)\r
-                               destColor = video::ECF_R5G6B5;\r
-                       else\r
-                               destColor = video::ECF_A1R5G5B5;\r
-               break;\r
-               case 24: destColor = video::ECF_R8G8B8; break;\r
-               case 32: destColor = video::ECF_A8R8G8B8; break;\r
-               default:\r
-                       os::Printer::log("Unsupported screen depth.");\r
-                       return false;\r
-       }\r
-\r
-       u8* srcdata = reinterpret_cast<u8*>(image->getData());\r
-       u8* destData = reinterpret_cast<u8*>(SoftwareImage->data);\r
-\r
-       const u32 destheight = SoftwareImage->height;\r
-       const u32 srcheight = core::min_(image->getDimension().Height, destheight);\r
-       const u32 srcPitch = image->getPitch();\r
-       for (u32 y=0; y!=srcheight; ++y)\r
-       {\r
-               video::CColorConverter::convert_viaFormat(srcdata,image->getColorFormat(), minWidth, destData, destColor);\r
-               srcdata+=srcPitch;\r
-               destData+=destPitch;\r
-       }\r
-\r
-       GC gc = DefaultGC(XDisplay, DefaultScreen(XDisplay));\r
-       Window myWindow=XWindow;\r
-       if (windowId)\r
-               myWindow = reinterpret_cast<Window>(windowId);\r
-       XPutImage(XDisplay, myWindow, gc, SoftwareImage, 0, 0, 0, 0, destwidth, destheight);\r
-#endif\r
-       return true;\r
-}\r
-\r
-\r
 //! notifies the device that it should close itself\r
 void CIrrDeviceLinux::closeDevice()\r
 {\r
index 1ef76724c0735daf7ef4a71bb372e14b1c604699..fe1ede035f57506c9bd9ed38e762f8b296cb94fe 100644 (file)
@@ -11,7 +11,6 @@
 \r
 #include "CIrrDeviceStub.h"\r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 #include "ICursorControl.h"\r
 #include "os.h"\r
 \r
@@ -33,7 +32,7 @@
 namespace irr\r
 {\r
 \r
-       class CIrrDeviceLinux : public CIrrDeviceStub, public video::IImagePresenter\r
+       class CIrrDeviceLinux : public CIrrDeviceStub\r
        {\r
        public:\r
 \r
@@ -68,9 +67,6 @@ namespace irr
                //! returns color format of the window.\r
                video::ECOLOR_FORMAT getColorFormat() const override;\r
 \r
-               //! presents a surface in the client area\r
-               bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ) override;\r
-\r
                //! notifies the device that it should close itself\r
                void closeDevice() override;\r
 \r
@@ -410,7 +406,6 @@ namespace irr
                Window XWindow;\r
                XSetWindowAttributes WndAttributes;\r
                XSizeHints* StdHints;\r
-               XImage* SoftwareImage;\r
                XIM XInputMethod;\r
                XIC XInputContext;\r
                bool HasNetWM;\r
index 6eac56d45e971b0affb40edf0f99b7d4f427292e..b8cdb42bdc377172fe44496dd4f9af4ebb2b7d6d 100644 (file)
@@ -12,7 +12,6 @@
 \r
 #include "CIrrDeviceStub.h"\r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 #include "IGUIEnvironment.h"\r
 #include "ICursorControl.h"\r
 \r
@@ -36,7 +35,7 @@ namespace irr
 \r
 namespace irr\r
 {\r
-       class CIrrDeviceMacOSX : public CIrrDeviceStub, video::IImagePresenter\r
+       class CIrrDeviceMacOSX : public CIrrDeviceStub\r
        {\r
        public:\r
 \r
@@ -68,9 +67,6 @@ namespace irr
                //! Checks if the Irrlicht window is minimized\r
                bool isWindowMinimized() const override;\r
 \r
-               //! presents a surface in the client area\r
-               bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ) override;\r
-\r
                //! notifies the device that it should close itself\r
                void closeDevice() override;\r
 \r
@@ -237,14 +233,12 @@ namespace irr
 \r
                NSWindow* Window;\r
         CGDirectDisplayID Display;\r
-               NSBitmapImageRep* SoftwareDriverTarget;\r
                std::map<int,int> KeyCodes;\r
                int DeviceWidth;\r
                int DeviceHeight;\r
                int ScreenWidth;\r
                int ScreenHeight;\r
                u32 MouseButtonStates;\r
-        u32 SoftwareRendererType;\r
         bool IsFullscreen;\r
                bool IsActive;\r
                bool IsShiftDown;\r
index 16236e045688a083fb84be9c127849124be7b1cf..e3b2a9ab9d29e73275598cfed5edfd380c10615e 100644 (file)
@@ -547,8 +547,8 @@ namespace irr
 //! constructor
 CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
        : CIrrDeviceStub(param), Window(NULL), Display(NULL),
-       SoftwareDriverTarget(0), DeviceWidth(0), DeviceHeight(0),
-       ScreenWidth(0), ScreenHeight(0), MouseButtonStates(0), SoftwareRendererType(0),
+       DeviceWidth(0), DeviceHeight(0),
+       ScreenWidth(0), ScreenHeight(0), MouseButtonStates(0),
        IsActive(true), IsFullscreen(false), IsShiftDown(false), IsControlDown(false), IsResizable(false)
 {
        struct utsname name;
@@ -617,7 +617,6 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
 
 CIrrDeviceMacOSX::~CIrrDeviceMacOSX()
 {
-       [SoftwareDriverTarget release];
        [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
        closeDevice();
 #if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
@@ -731,24 +730,6 @@ void CIrrDeviceMacOSX::createDriver()
 {
        switch (CreationParams.DriverType)
        {
-               case video::EDT_SOFTWARE:
-#ifdef _IRR_COMPILE_WITH_SOFTWARE_
-                       VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this);
-                       SoftwareRendererType = 2;
-#else
-                       os::Printer::log("No Software driver support compiled in.", ELL_ERROR);
-#endif
-                       break;
-
-               case video::EDT_BURNINGSVIDEO:
-#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
-                       VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this);
-                       SoftwareRendererType = 1;
-#else
-                       os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);
-#endif
-                       break;
-
                case video::EDT_OPENGL:
 #ifdef _IRR_COMPILE_WITH_OPENGL_
             {
@@ -1358,87 +1339,6 @@ core::position2di CIrrDeviceMacOSX::getWindowPosition()
 }
 
 
-
-bool CIrrDeviceMacOSX::present(video::IImage* surface, void* windowId, core::rect<s32>* src )
-{
-       // todo: implement window ID and src rectangle
-
-       if (!surface)
-               return false;
-
-       if (SoftwareRendererType > 0)
-       {
-               const u32 colorSamples=3;
-               // do we need to change the size?
-               const bool updateSize = !SoftwareDriverTarget ||
-                               s32([SoftwareDriverTarget size].width) != surface->getDimension().Width ||
-                               s32([SoftwareDriverTarget size].height) != surface->getDimension().Height;
-
-               NSRect areaRect = NSMakeRect(0.0, 0.0, surface->getDimension().Width, surface->getDimension().Height);
-               const u32 destPitch = (colorSamples * areaRect.size.width);
-
-               // create / update the target
-               if (updateSize)
-               {
-                       [SoftwareDriverTarget release];
-                       // allocate target for IImage
-                       SoftwareDriverTarget = [[NSBitmapImageRep alloc]
-                                       initWithBitmapDataPlanes: nil
-                                       pixelsWide: areaRect.size.width
-                                       pixelsHigh: areaRect.size.height
-                                       bitsPerSample: 8
-                                       samplesPerPixel: colorSamples
-                                       hasAlpha: NO
-                                       isPlanar: NO
-                                       colorSpaceName: NSCalibratedRGBColorSpace
-                                       bytesPerRow: destPitch
-                                       bitsPerPixel: 8*colorSamples];
-               }
-
-               if (SoftwareDriverTarget==nil)
-                       return false;
-
-               // get pointer to image data
-               unsigned char* imgData = (unsigned char*)surface->getData();
-
-               u8* srcdata = reinterpret_cast<u8*>(imgData);
-               u8* destData = reinterpret_cast<u8*>([SoftwareDriverTarget bitmapData]);
-               const u32 srcheight = core::min_(surface->getDimension().Height, (u32)areaRect.size.height);
-               const u32 srcPitch = surface->getPitch();
-               const u32 minWidth = core::min_(surface->getDimension().Width, (u32)areaRect.size.width);
-               for (u32 y=0; y!=srcheight; ++y)
-               {
-                       if(SoftwareRendererType == 2)
-                       {
-                               if (surface->getColorFormat() == video::ECF_A8R8G8B8)
-                                       video::CColorConverter::convert_A8R8G8B8toB8G8R8(srcdata, minWidth, destData);
-                               else if (surface->getColorFormat() == video::ECF_A1R5G5B5)
-                                       video::CColorConverter::convert_A1R5G5B5toB8G8R8(srcdata, minWidth, destData);
-                               else
-                                       video::CColorConverter::convert_viaFormat(srcdata, surface->getColorFormat(), minWidth, destData, video::ECF_R8G8B8);
-                       }
-                       else
-                       {
-                               if (surface->getColorFormat() == video::ECF_A8R8G8B8)
-                                       video::CColorConverter::convert_A8R8G8B8toR8G8B8(srcdata, minWidth, destData);
-                               else if (surface->getColorFormat() == video::ECF_A1R5G5B5)
-                                       video::CColorConverter::convert_A1R5G5B5toR8G8B8(srcdata, minWidth, destData);
-                               else
-                                       video::CColorConverter::convert_viaFormat(srcdata, surface->getColorFormat(), minWidth, destData, video::ECF_R8G8B8);
-                       }
-
-                       srcdata += srcPitch;
-                       destData += destPitch;
-               }
-
-               // todo: draw properly into a sub-view
-               [SoftwareDriverTarget draw];
-       }
-
-       return false;
-}
-
-
 #if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
 static void joystickRemovalCallback(void * target,
                IOReturn result, void * refcon, void * sender)
index 12574d5a72f468ddbbc5085035c70579ede070c6..8452c6b9cfe4903edfbbfd312163ee70230958eb 100644 (file)
@@ -372,22 +372,6 @@ void CIrrDeviceSDL::createDriver()
 \r
                break;\r
 \r
-       case video::EDT_SOFTWARE:\r
-               #ifdef _IRR_COMPILE_WITH_SOFTWARE_\r
-               VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this);\r
-               #else\r
-               os::Printer::log("No Software driver support compiled in.", ELL_ERROR);\r
-               #endif\r
-               break;\r
-\r
-       case video::EDT_BURNINGSVIDEO:\r
-               #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_\r
-               VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this);\r
-               #else\r
-               os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);\r
-               #endif\r
-               break;\r
-\r
        case video::EDT_OPENGL:\r
                #ifdef _IRR_COMPILE_WITH_OPENGL_\r
                ContextManager = new video::CSDLManager(this);\r
@@ -846,90 +830,6 @@ void CIrrDeviceSDL::setWindowCaption(const wchar_t* text)
 }\r
 \r
 \r
-//! presents a surface in the client area\r
-bool CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip)\r
-{\r
-#ifdef _IRR_EMSCRIPTEN_PLATFORM_\r
-       return true;\r
-#else // !_IRR_EMSCRIPTEN_PLATFORM_\r
-       SDL_Surface *sdlSurface = SDL_CreateRGBSurfaceFrom(\r
-                       surface->getData(), surface->getDimension().Width, surface->getDimension().Height,\r
-                       surface->getBitsPerPixel(), surface->getPitch(),\r
-                       surface->getRedMask(), surface->getGreenMask(), surface->getBlueMask(), surface->getAlphaMask());\r
-       if (!sdlSurface)\r
-               return false;\r
-       SDL_SetSurfaceAlphaMod(sdlSurface, 0);\r
-       SDL_SetColorKey(sdlSurface, 0, 0);\r
-       sdlSurface->format->BitsPerPixel=surface->getBitsPerPixel();\r
-       sdlSurface->format->BytesPerPixel=surface->getBytesPerPixel();\r
-       if ((surface->getColorFormat()==video::ECF_R8G8B8) ||\r
-                       (surface->getColorFormat()==video::ECF_A8R8G8B8))\r
-       {\r
-               sdlSurface->format->Rloss=0;\r
-               sdlSurface->format->Gloss=0;\r
-               sdlSurface->format->Bloss=0;\r
-               sdlSurface->format->Rshift=16;\r
-               sdlSurface->format->Gshift=8;\r
-               sdlSurface->format->Bshift=0;\r
-               if (surface->getColorFormat()==video::ECF_R8G8B8)\r
-               {\r
-                       sdlSurface->format->Aloss=8;\r
-                       sdlSurface->format->Ashift=32;\r
-               }\r
-               else\r
-               {\r
-                       sdlSurface->format->Aloss=0;\r
-                       sdlSurface->format->Ashift=24;\r
-               }\r
-       }\r
-       else if (surface->getColorFormat()==video::ECF_R5G6B5)\r
-       {\r
-               sdlSurface->format->Rloss=3;\r
-               sdlSurface->format->Gloss=2;\r
-               sdlSurface->format->Bloss=3;\r
-               sdlSurface->format->Aloss=8;\r
-               sdlSurface->format->Rshift=11;\r
-               sdlSurface->format->Gshift=5;\r
-               sdlSurface->format->Bshift=0;\r
-               sdlSurface->format->Ashift=16;\r
-       }\r
-       else if (surface->getColorFormat()==video::ECF_A1R5G5B5)\r
-       {\r
-               sdlSurface->format->Rloss=3;\r
-               sdlSurface->format->Gloss=3;\r
-               sdlSurface->format->Bloss=3;\r
-               sdlSurface->format->Aloss=7;\r
-               sdlSurface->format->Rshift=10;\r
-               sdlSurface->format->Gshift=5;\r
-               sdlSurface->format->Bshift=0;\r
-               sdlSurface->format->Ashift=15;\r
-       }\r
-\r
-       SDL_Surface* scr = (SDL_Surface* )windowId;\r
-       if (!scr)\r
-               scr = SDL_GetWindowSurface(Window);\r
-       if (scr)\r
-       {\r
-               if (srcClip)\r
-               {\r
-                       SDL_Rect sdlsrcClip;\r
-                       sdlsrcClip.x = srcClip->UpperLeftCorner.X;\r
-                       sdlsrcClip.y = srcClip->UpperLeftCorner.Y;\r
-                       sdlsrcClip.w = srcClip->getWidth();\r
-                       sdlsrcClip.h = srcClip->getHeight();\r
-                       SDL_BlitSurface(sdlSurface, &sdlsrcClip, scr, NULL);\r
-               }\r
-               else\r
-                       SDL_BlitSurface(sdlSurface, NULL, scr, NULL);\r
-               SDL_RenderPresent(SDL_GetRenderer(Window));\r
-       }\r
-\r
-       SDL_FreeSurface(sdlSurface);\r
-       return (scr != 0);\r
-#endif // !_IRR_EMSCRIPTEN_PLATFORM_\r
-}\r
-\r
-\r
 //! notifies the device that it should close itself\r
 void CIrrDeviceSDL::closeDevice()\r
 {\r
index ab809ddc7befbde4b4623f02d167566cf46f289f..5a38d774337ef0f4d2a6ec1ef3fee4c011b2720b 100644 (file)
@@ -13,7 +13,6 @@
 \r
 #include "IrrlichtDevice.h"\r
 #include "CIrrDeviceStub.h"\r
-#include "IImagePresenter.h"\r
 #include "ICursorControl.h"\r
 \r
 #ifdef _IRR_EMSCRIPTEN_PLATFORM_\r
@@ -28,7 +27,7 @@
 namespace irr\r
 {\r
 \r
-       class CIrrDeviceSDL : public CIrrDeviceStub, video::IImagePresenter\r
+       class CIrrDeviceSDL : public CIrrDeviceStub\r
        {\r
        public:\r
 \r
@@ -62,9 +61,6 @@ namespace irr
                //! returns color format of the window.\r
                video::ECOLOR_FORMAT getColorFormat() const override;\r
 \r
-               //! presents a surface in the client area\r
-               bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0) override;\r
-\r
                //! notifies the device that it should close itself\r
                void closeDevice() override;\r
 \r
index ab90e5011d45dad529252c317323ba9ec7dc9641..c6e005935cddd5d1f4716151949b6aee22f3ac5c 100644 (file)
@@ -6,7 +6,6 @@
 #define __C_IRR_DEVICE_STUB_H_INCLUDED__\r
 \r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 #include "SIrrCreationParameters.h"\r
 #include "IContextManager.h"\r
 \r
@@ -36,11 +35,6 @@ namespace irr
 \r
        namespace video\r
        {\r
-               IVideoDriver* createSoftwareDriver(const core::dimension2d<u32>& windowSize,\r
-                               bool fullscreen, io::IFileSystem* io,\r
-                               video::IImagePresenter* presenter);\r
-               IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params,\r
-                               io::IFileSystem* io, video::IImagePresenter* presenter);\r
                IVideoDriver* createNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize);\r
        }\r
 \r
index f5508078bb1b33000655c99564482819f721e5e4..0c513040c0038f12cfde67c218323067a5cf7bf7 100644 (file)
@@ -1009,24 +1009,6 @@ void CIrrDeviceWin32::createDriver()
        case video::EDT_WEBGL1:\r
                os::Printer::log("WebGL1 driver not supported on Win32 device.", ELL_ERROR);\r
                break;\r
-       case video::EDT_SOFTWARE:\r
-#ifdef _IRR_COMPILE_WITH_SOFTWARE_\r
-               switchToFullScreen();\r
-\r
-               VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this);\r
-#else\r
-               os::Printer::log("Software driver was not compiled in.", ELL_ERROR);\r
-#endif\r
-               break;\r
-       case video::EDT_BURNINGSVIDEO:\r
-#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_\r
-               switchToFullScreen();\r
-\r
-               VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this);\r
-#else\r
-               os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR);\r
-#endif\r
-               break;\r
        case video::EDT_NULL:\r
                VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);\r
                break;\r
@@ -1127,54 +1109,6 @@ void CIrrDeviceWin32::setWindowCaption(const wchar_t* text)
 }\r
 \r
 \r
-//! presents a surface in the client area\r
-bool CIrrDeviceWin32::present(video::IImage* image, void* windowId, core::rect<s32>* src)\r
-{\r
-       HWND hwnd = HWnd;\r
-       if ( windowId )\r
-               hwnd = static_cast<HWND>(windowId);\r
-\r
-       HDC dc = GetDC(hwnd);\r
-\r
-       if ( dc )\r
-       {\r
-               RECT rect;\r
-               GetClientRect(hwnd, &rect);\r
-               const void* memory = (const void *)image->getData();\r
-\r
-               BITMAPV4HEADER bi;\r
-               ZeroMemory (&bi, sizeof(bi));\r
-               bi.bV4Size = sizeof(BITMAPINFOHEADER);\r
-               bi.bV4BitCount = (WORD)image->getBitsPerPixel();\r
-               bi.bV4Planes = 1;\r
-               bi.bV4Width = image->getDimension().Width;\r
-               bi.bV4Height = -((s32)image->getDimension().Height);\r
-               bi.bV4V4Compression = BI_BITFIELDS;\r
-               bi.bV4AlphaMask = image->getAlphaMask();\r
-               bi.bV4RedMask = image->getRedMask();\r
-               bi.bV4GreenMask = image->getGreenMask();\r
-               bi.bV4BlueMask = image->getBlueMask();\r
-\r
-               if ( src )\r
-               {\r
-                       StretchDIBits(dc, 0,0, rect.right, rect.bottom,\r
-                                       src->UpperLeftCorner.X, src->UpperLeftCorner.Y,\r
-                                       src->getWidth(), src->getHeight(),\r
-                                       memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY);\r
-               }\r
-               else\r
-               {\r
-                       StretchDIBits(dc, 0,0, rect.right, rect.bottom,\r
-                                       0, 0, image->getDimension().Width, image->getDimension().Height,\r
-                                       memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY);\r
-               }\r
-\r
-               ReleaseDC(hwnd, dc);\r
-       }\r
-       return true;\r
-}\r
-\r
-\r
 //! notifies the device that it should close itself\r
 void CIrrDeviceWin32::closeDevice()\r
 {\r
index 92cdb8f848c73e0e1b097d3fdbcf8e51dca9bee3..8cd324bc16b6ae2a0b1d634d61009937d34ec5a0 100644 (file)
@@ -10,7 +10,6 @@
 \r
 #include "CIrrDeviceStub.h"\r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 \r
 #define WIN32_LEAN_AND_MEAN\r
 #include <windows.h>\r
@@ -25,7 +24,7 @@ namespace irr
 {\r
        struct SJoystickWin32Control;\r
 \r
-       class CIrrDeviceWin32 : public CIrrDeviceStub, video::IImagePresenter\r
+       class CIrrDeviceWin32 : public CIrrDeviceStub\r
        {\r
        friend struct SJoystickWin32Control;\r
        public:\r
@@ -58,9 +57,6 @@ namespace irr
                //! returns if window is minimized\r
                bool isWindowMinimized() const override;\r
 \r
-               //! presents a surface in the client area\r
-               bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0) override;\r
-\r
                //! notifies the device that it should close itself\r
                void closeDevice() override;\r
 \r
index 13ebf60b2f57845f130a552f19f00a422fec3f01..d383c182aa50d30581f09f93918b7dcce1819014 100644 (file)
 \r
 #include "CIrrDeviceStub.h"\r
 #include "IrrlichtDevice.h"\r
-#include "IImagePresenter.h"\r
 \r
 namespace irr\r
 {\r
 \r
-       class CIrrDeviceiOS : public CIrrDeviceStub, public video::IImagePresenter\r
+       class CIrrDeviceiOS : public CIrrDeviceStub\r
        {\r
        public:\r
                CIrrDeviceiOS(const SIrrlichtCreationParameters& params);\r
@@ -34,8 +33,6 @@ namespace irr
                bool isWindowFocused() const override;\r
                bool isWindowMinimized() const override;\r
 \r
-               bool present(video::IImage* surface, void * windowId = 0, core::rect<s32>* src = 0) override;\r
-\r
                void closeDevice() override;\r
 \r
                void setResizable(bool resize = false) override;\r
index 8386e1e33ac83953abfecea3a55ecad9adbc5297..3a0575d3dbede0ea2f37c288488aec2f44524bc5 100644 (file)
@@ -480,11 +480,6 @@ namespace irr
 #endif\r
     }\r
 \r
-    bool CIrrDeviceiOS::present(video::IImage* image, void * windowId, core::rect<s32>* src)\r
-    {\r
-        return false;\r
-    }\r
-\r
     void CIrrDeviceiOS::closeDevice()\r
     {\r
         CFRunLoopStop(CFRunLoopGetMain());\r
index 81993085291a963876ae750388baf35ccf1616d7..e6cdce66da61b296cb978f0e6b340fa157dcb637 100644 (file)
@@ -7,7 +7,6 @@
 \r
 #include "IVideoDriver.h"\r
 #include "IFileSystem.h"\r
-#include "IImagePresenter.h"\r
 #include "IGPUProgrammingServices.h"\r
 #include "irrArray.h"\r
 #include "irrString.h"\r
diff --git a/source/Irrlicht/IImagePresenter.h b/source/Irrlicht/IImagePresenter.h
deleted file mode 100644 (file)
index c93fc85..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2002-2012 Nikolaus Gebhardt\r
-// This file is part of the "Irrlicht Engine".\r
-// For conditions of distribution and use, see copyright notice in irrlicht.h\r
-\r
-#ifndef __I_IMAGE_PRESENTER_H_INCLUDED__\r
-#define __I_IMAGE_PRESENTER_H_INCLUDED__\r
-\r
-#include "IImage.h"\r
-\r
-namespace irr\r
-{\r
-namespace video\r
-{\r
-\r
-/*!\r
-       Interface for a class which is able to present an IImage\r
-       an the Screen. Usually only implemented by an IrrDevice for\r
-       presenting Software Device Rendered images.\r
-\r
-       This class should be used only internally.\r
-*/\r
-\r
-       class IImagePresenter\r
-       {\r
-       public:\r
-\r
-               virtual ~IImagePresenter() {};\r
-               //! presents a surface in the client area\r
-               virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ) = 0;\r
-       };\r
-\r
-} // end namespace video\r
-} // end namespace irr\r
-\r
-#endif\r
-\r