mirror of https://github.com/axmolengine/axmol.git
implement interface setKeepMatrix, setVirtualViewPort
This commit is contained in:
parent
68130fb4d0
commit
756024e9f1
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue