Beispiel #1
0
bool
Bitmap::Reload()
{
  assert(id != 0);
  assert(texture == NULL);

  texture = LoadResourceTexture(id);
  if (texture == NULL)
    return false;

  width = texture->get_width();
  height = texture->get_height();
  return true;
}
Beispiel #2
0
bool
Bitmap::Reload()
{
  assert(id != 0 || !pathName.empty());
  assert(texture == NULL);

  texture = (id != 0) ? LoadResourceTexture(id) :
                        LoadFileTexture(pathName.c_str());
  if (texture == NULL)
    return false;

  size.cx = texture->GetWidth();
  size.cy = texture->GetHeight();
  return true;
}
Beispiel #3
0
bool
Bitmap::Reload()
{
  assert(id.IsDefined() || !pathName.empty());
  assert(texture == nullptr);

  texture = id.IsDefined()
    ? LoadResourceTexture(id, type)
    : LoadFileTexture(pathName.c_str());
  if (texture == nullptr)
    return false;

  size.cx = texture->GetWidth();
  size.cy = texture->GetHeight();
  return true;
}