implement interface setKeepMatrix, setVirtualViewPort

This commit is contained in:
Huabing.Xu 2014-03-04 15:07:28 +08:00
parent 68130fb4d0
commit 756024e9f1
2 changed files with 16 additions and 1 deletions

View File

@ -301,6 +301,21 @@ bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat
return ret;
}
void RenderTexture::setKeepMatrix(bool keepMatrix)
{
_keepMatrix = keepMatrix;
}
void RenderTexture::setVirtualViewPort(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport)
{
_rtTextureRect.origin.x = rtBegin.x;
_rtTextureRect.origin.y = rtBegin.y;
_fullRect = fullRect;
_fullviewPort = fullViewport;
}
void RenderTexture::beginWithClear(float r, float g, float b, float a)
{
beginWithClear(r, g, b, a, 0, 0, GL_COLOR_BUFFER_BIT);

View File

@ -158,7 +158,7 @@ public:
virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override;
void setKeepMatrix(bool keepMatrix);
void setVirtualViewPort(Point& rtBegin, Rect& fullRect, Rect& fullViewport);
void setVirtualViewPort(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport);