diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-01-10 10:16:52 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2012-01-10 10:16:52 -0800 |
commit | 33680ff630760228c33cc3731eb5718be7bbc04f (patch) | |
tree | 5526f284b362418518d7ebe1d77fcefe3941450a /libs/rs/rsScriptC_LibGL.cpp | |
parent | dd1da451159578d865230ceada3e1f0058e3c18e (diff) |
Adding ability to bind constants to shaders.
Change-Id: I63b664fd2fec7e0c8157b7185782192132222f1a
Diffstat (limited to 'libs/rs/rsScriptC_LibGL.cpp')
-rw-r--r-- | libs/rs/rsScriptC_LibGL.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp index a79c3cbb1dcf..611a6a7babd2 100644 --- a/libs/rs/rsScriptC_LibGL.cpp +++ b/libs/rs/rsScriptC_LibGL.cpp @@ -50,6 +50,18 @@ void rsrBindTexture(Context *rsc, Script *sc, ProgramFragment *pf, uint32_t slot pf->bindTexture(rsc, slot, a); } +void rsrBindConstant(Context *rsc, Script *sc, ProgramFragment *pf, uint32_t slot, Allocation *a) { + CHECK_OBJ_OR_NULL(a); + CHECK_OBJ(pf); + pf->bindAllocation(rsc, a, slot); +} + +void rsrBindConstant(Context *rsc, Script *sc, ProgramVertex *pf, uint32_t slot, Allocation *a) { + CHECK_OBJ_OR_NULL(a); + CHECK_OBJ(pf); + pf->bindAllocation(rsc, a, slot); +} + void rsrBindSampler(Context *rsc, Script *sc, ProgramFragment *pf, uint32_t slot, Sampler *s) { CHECK_OBJ_OR_NULL(vs); CHECK_OBJ(vpf); |