#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<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_videoIVideoDriver_endScene(void* driver)
+ bool
+ irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver)
{
return ((irr::video::IVideoDriver*)driver)->endScene();
}