Forum Discussion
sonnykr
11 years agoVisitor
"TheEndless" wrote:
Can you share the code that's causing this? Are you verifying that roTextureRequestEvent.GetState() indicates the bitmap is ready (3)?
My Code looks some thing like this:
if (msg <> invalid and type(msg) = "roTextureRequestEvent")
' read the response received
state = msg.GetState()
id = msg.GetId()
uri = msg.GetURI()
' check if the image was downloaded successfully
if (state = 3)
DebugLog("AsyncTextureManager", "Image downloaded successfully. URL : " + uri)
if (type(msg.GetBitmap()) = "roBitmap" or type(msg.GetBitmap()) = "bitmap")
receivedBitmap = msg.GetBitmap()
' execute the successCallback
successCallback(receivedBitmap, context)
else
DebugLog("AsyncTextureManager", "Bitmap download Failed")
end if
end if
end if
and
receivedBitmap = msg.GetBitmap()
is where it breaks.