Some background info about the problem http://blogs.msdn.com/grantri/archive/2 ... 83524.aspx
When backbuffer is of 16-bit format (true for WinCE) the destination pointer transferred to memset32() function can be not aligned to 4-byte boundary.
Code to reproduce the bug:
Code: Select all
#include <irrlicht.h>
#include <iostream>
#include <windows.h>
#include <string.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
{
video::E_DRIVER_TYPE driverType = EDT_BURNINGSVIDEO;
// create device and exit if creation failed
IrrlichtDevice * device = createDevice(driverType, core::dimension2d<u32>(240, 320));
if (device == 0)
return 1; // could not create selected driver.
video::IVideoDriver* driver = device->getVideoDriver();
while(device->run() && driver)
if (device->isWindowActive())
{
driver->beginScene(true, true, SColor(0,200,200,200));
driver->draw2DRectangle(SColor(255, 0, 255, 0), rect<s32>(1,1,40,40));//<-exception
driver->endScene();
}
device->drop();
return 0;
}