diff options
| author | 2009-11-12 16:29:26 -0800 | |
|---|---|---|
| committer | 2009-11-12 16:29:26 -0800 | |
| commit | 4dd6fee7e444c65f3613b4126124622b32a5d4ff (patch) | |
| tree | da920fce2372655bf049b1da7bf689bb0ed7cd1a /libs/rs/rsProgramVertex.cpp | |
| parent | 572e0087a86c6781e3334f8a6f901039a407138d (diff) | |
| parent | eb4b031804f42d52645d0d74f8ebc806f85a043b (diff) | |
Merge change Ieb4b0318 into eclair
* changes:
Make default vertex program correctly track surface size.
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
| -rw-r--r-- | libs/rs/rsProgramVertex.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index eea8b3b67068..68f589f45f82 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -157,12 +157,17 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) pv->bindAllocation(alloc); + updateSize(rsc, w, h); +} + +void ProgramVertexState::updateSize(Context *rsc, int32_t w, int32_t h) +{ Matrix m; m.loadOrtho(0,w, h,0, -1,1); - alloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4); + mDefaultAlloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4); m.loadIdentity(); - alloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4); + mDefaultAlloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4); } void ProgramVertexState::deinit(Context *rsc) |