diff options
author | 2011-11-17 09:13:24 -0800 | |
---|---|---|
committer | 2011-11-17 09:13:24 -0800 | |
commit | 5044556861af496d6451aef3f69a4df0d1b591c9 (patch) | |
tree | e083a6288023969c64e6d22c8cec5887bdd5fff0 /libs/rs/rsProgramVertex.cpp | |
parent | 1bce803f663d50a3a60fab63f565f91bce5c35e5 (diff) | |
parent | 2d8ef49914595f3f1df42fed0a9ae68777ff9411 (diff) |
Merge "Fixing FBO font rendering bug that resulted from using old surface size."
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
-rw-r--r-- | libs/rs/rsProgramVertex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index 4a1362254b0b..871caacd6f66 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -206,8 +206,11 @@ void ProgramVertexState::init(Context *rsc) { void ProgramVertexState::updateSize(Context *rsc) { float *f = static_cast<float *>(mDefaultAlloc->getPtr()); + float surfaceWidth = (float)rsc->getCurrentSurfaceWidth(); + float surfaceHeight = (float)rsc->getCurrentSurfaceHeight(); + Matrix4x4 m; - m.loadOrtho(0,rsc->getWidth(), rsc->getHeight(),0, -1,1); + m.loadOrtho(0, surfaceWidth, surfaceHeight, 0, -1, 1); memcpy(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET], m.m, sizeof(m)); memcpy(&f[RS_PROGRAM_VERTEX_MVP_OFFSET], m.m, sizeof(m)); |