Loading libs/rs/rsProgramVertex.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,8 @@ void ProgramVertex::setupGL2(const Context *rsc, ProgramVertexState *state, Shad //return; } glVertexAttrib4f(1, state->color[0], state->color[1], state->color[2], state->color[3]); const float *f = static_cast<const float *>(mConstants->getPtr()); Matrix mvp; Loading Loading @@ -259,6 +261,11 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) pv->init(rsc); pv->bindAllocation(alloc); color[0] = 1.f; color[1] = 1.f; color[2] = 1.f; color[3] = 1.f; updateSize(rsc, w, h); } Loading libs/rs/rsProgramVertex.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public: ObjectBaseRef<Type> mAllocType; float color[4]; }; Loading libs/rs/rsScriptC_Lib.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -842,6 +842,10 @@ static void SC_drawSimpleMeshRange(RsSimpleMesh vsm, uint32_t start, uint32_t le static void SC_color(float r, float g, float b, float a) { GET_TLS(); rsc->mStateVertex.color[0] = r; rsc->mStateVertex.color[1] = g; rsc->mStateVertex.color[2] = b; rsc->mStateVertex.color[3] = a; if (rsc->checkVersion2_0()) { glVertexAttrib4f(1, r, g, b, a); } else { Loading Loading
libs/rs/rsProgramVertex.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,8 @@ void ProgramVertex::setupGL2(const Context *rsc, ProgramVertexState *state, Shad //return; } glVertexAttrib4f(1, state->color[0], state->color[1], state->color[2], state->color[3]); const float *f = static_cast<const float *>(mConstants->getPtr()); Matrix mvp; Loading Loading @@ -259,6 +261,11 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) pv->init(rsc); pv->bindAllocation(alloc); color[0] = 1.f; color[1] = 1.f; color[2] = 1.f; color[3] = 1.f; updateSize(rsc, w, h); } Loading
libs/rs/rsProgramVertex.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public: ObjectBaseRef<Type> mAllocType; float color[4]; }; Loading
libs/rs/rsScriptC_Lib.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -842,6 +842,10 @@ static void SC_drawSimpleMeshRange(RsSimpleMesh vsm, uint32_t start, uint32_t le static void SC_color(float r, float g, float b, float a) { GET_TLS(); rsc->mStateVertex.color[0] = r; rsc->mStateVertex.color[1] = g; rsc->mStateVertex.color[2] = b; rsc->mStateVertex.color[3] = a; if (rsc->checkVersion2_0()) { glVertexAttrib4f(1, r, g, b, a); } else { Loading