diff options
| author | 2009-07-28 12:02:16 -0700 | |
|---|---|---|
| committer | 2009-07-28 12:02:16 -0700 | |
| commit | b0ec1b46d6f5b5612e33fe43a828abea79b87a00 (patch) | |
| tree | 3bf6193634273ec0cbf2e6a024f8afb315fb2f61 /libs/rs/rsProgramVertex.cpp | |
| parent | 8af858e9b6577d074c5427e601b6418d288fdb9d (diff) | |
Add "boxed" bitmap uploads which simply place a non-pow2 bitmap into the smallest larger pow texture. The added space is filled black.
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
| -rw-r--r-- | libs/rs/rsProgramVertex.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index 417ba6aed13e..792135d4cfc6 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -55,8 +55,6 @@ void ProgramVertex::setupGL() glLoadIdentity(); } - - LOGE("lights %i ", mLightCount); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); if (mLightCount) { @@ -103,6 +101,25 @@ void ProgramVertex::addLight(const Light *l) } } +void ProgramVertex::setProjectionMatrix(const rsc_Matrix *m) const +{ + float *f = static_cast<float *>(mConstants[0]->getPtr()); + memcpy(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET], m, sizeof(rsc_Matrix)); +} + +void ProgramVertex::setModelviewMatrix(const rsc_Matrix *m) const +{ + float *f = static_cast<float *>(mConstants[0]->getPtr()); + memcpy(&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET], m, sizeof(rsc_Matrix)); +} + +void ProgramVertex::setTextureMatrix(const rsc_Matrix *m) const +{ + float *f = static_cast<float *>(mConstants[0]->getPtr()); + memcpy(&f[RS_PROGRAM_VERTEX_TEXTURE_OFFSET], m, sizeof(rsc_Matrix)); +} + + ProgramVertexState::ProgramVertexState() { |