Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to create a Bitmap and BitmapTex objects in C++, but I'm running into an issue with actually assigning the bitmaps. It seems like calling SetBitmap() doesn't actually set the bitmap.
The below code will always print "Bitmap created!" and then "No bitmap retrieved!"
BitmapInfo bitmapInfo;
bitmapInfo.SetType(BMM_TRUE_64);
bitmapInfo.SetHeight(debugSquareSize);
bitmapInfo.SetWidth(debugSquareSize);
Bitmap* newBitmap = TheManager->Create(&bitmapInfo);
if(newBitmap != nullptr)
{
DebugPrint("Bitmap created!");
}
BitmapTex* newBitmapTexture = NewDefaultBitmapTex();
newBitmapTexture->SetBitmap(newBitmap);
Bitmap* retrievedBitmap = newBitmapTexture->GetBitmap(0);
if(retrievedBitmap == nullptr)
{
DebugPrint("No bitmap retrieved!");
}
I'm wondering if anyone has attempted something similar and knows what might be going wrong here?
Solved! Go to Solution.