On 14/07/2015 at 06:52, xxxxxxxx wrote:
Hi Ama,
I have no idea, what is going wrong on your end. I tested the code from your last post. It worked here with one minimal change.
Instead of
ShowBitmap(l_Render_Bitmap);
I used
ShowBitmap(renderBitmap);
Not sure, what you were trying to show there. But otherwise it worked here as expected.
Are you sure, the code got correctly recompiled? And are you sure, there's something to render in the scene? In which context do you use your code (in which function)?
And while we are at it, some more comments:
BaseContainer data = renderData->GetData(); // I'd use GetDataInstance() here, it's faster
Int32 bitmapSizeX, bitmapSizeY;
Int32 dataSizeX = data.GetInt32(RDATA_XRES); // not sure, what you are trying to achieve here, seems redundant
Int32 dataSizeY = data.GetInt32(RDATA_YRES);
data.SetInt32(RDATA_XRES, dataSizeX);
data.SetInt32(RDATA_YRES, dataSizeY);
bitmapSizeX = data.GetInt32(RDATA_XRES);
bitmapSizeY = data.GetInt32(RDATA_YRES);
So it would look like this:
BaseContainer* data = renderData->GetDataInstance();
Int32 bitmapSizeX, bitmapSizeY;
bitmapSizeX = data->GetInt32(RDATA_XRES);
bitmapSizeY = data->GetInt32(RDATA_YRES);