irr::video::SExposedVideoData vdata = irr::video::SExposedVideoData();
// Source rect
- irr::core::rect<irr::s32> rect = \
- irr::core::rect<irr::s32>(sourceRect->x,
- sourceRect->y,
- sourceRect->x2,
- sourceRect->y2);
+ irr::core::rect<irr::s32> rect;
+ if (sourceRect != NULL)
+ {
+ rect = irr::core::rect<irr::s32>(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_video_IVideoDriver_endScene(void* driver)