Beispiel #1
0
void csGLRender2TextureFramebuf::SetClipRect (const csRect& clipRect)
{
  GLRENDER3D_OUTPUT_LOCATION_MARKER;
  GLint vp[4];
  glGetIntegerv (GL_VIEWPORT, vp);
  glScissor (vp[0] + clipRect.xmin, vp[1] + txt_h - clipRect.ymax, clipRect.Width(),
    clipRect.Height());
}
Beispiel #2
0
csLockedMaterialMap csTerrainCell::LockMaterialMap (const csRect& rectangle)
{
  csLockedMaterialMap data;
  
  if (!materialMapPersistent)
  {
    materialmap.SetSize (rectangle.Width () * rectangle.Height ());

    data.data = materialmap.GetArray ();
    data.pitch = rectangle.Width ();
  }
  else
  {
    data.data = materialmap.GetArray () + materialMapWidth * rectangle.ymin +
      rectangle.xmin;
    data.pitch = materialMapWidth;
  }

  lockedMaterialMapRect = rectangle;

  return data;
}
void pawsImageDrawable::Draw(csRect rect, int alpha)
{
    Draw(rect.xmin, rect.ymin, rect.Width(), rect.Height(), alpha);
}