X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2FIVideoDriver.cpp;h=8f3edbc9d869cb369e3759f39714c9007f366735;hb=3b8ff07b2c13c111e2b9eebaeaf64c7b17b29019;hp=13a21d15998e3e4de0abc74a87b7c19b9879ca16;hpb=4881087cbf493d736995a4051e0d13ed63ad6c3a;p=c-irrlicht.git diff --git a/src/IVideoDriver.cpp b/src/IVideoDriver.cpp index 13a21d1..8f3edbc 100644 --- a/src/IVideoDriver.cpp +++ b/src/IVideoDriver.cpp @@ -23,36 +23,42 @@ #include "IVideoDriver.h" extern "C" { - bool irr_video_IVideoDriver_beginScene(void* driver, - bool backBuffer, - bool zBuffer, - const irr_video_SColor* color, - void* videoData, // not used for now - const irr_core_rect_s32* sourceRect) + bool + irr_video_IVideoDriver_beginScene(irr_video_IVideoDriver* driver, + bool backBuffer, + bool zBuffer, + const irr_video_SColor* color, + irr_video_SExposedVideoData* videoData, + const irr_core_rect_s32* sourceRect) { // Color irr::video::SColor col = irr::video::SColor(color->a, color->r, color->g, color->b); // Video data + // TODO irr::video::SExposedVideoData vdata = irr::video::SExposedVideoData(); // Source rect - irr::core::rect rect = \ - irr::core::rect(sourceRect->x, - sourceRect->y, - sourceRect->x2, - sourceRect->y2); + irr::core::rect rect; + if (sourceRect != NULL) + { + rect = irr::core::rect(sourceRect->x, + sourceRect->y, + sourceRect->x2, + sourceRect->y2); + } // Begin scene return ((irr::video::IVideoDriver*)driver)->beginScene(backBuffer, - zBuffer, - col, - vdata, - &rect); + zBuffer, + col, + vdata, + sourceRect != NULL ? &rect : 0); } - bool irr_videoIVideoDriver_endScene(void* driver) + bool + irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver) { return ((irr::video::IVideoDriver*)driver)->endScene(); }