Lines Matching refs:rsc
49 void rsrBindTexture(Context *rsc, ProgramFragment *pf, uint32_t slot, Allocation *a) {
52 pf->bindTexture(rsc, slot, a);
55 void rsrBindConstant(Context *rsc, ProgramFragment *pf, uint32_t slot, Allocation *a) {
58 pf->bindAllocation(rsc, a, slot);
61 void rsrBindConstant(Context *rsc, ProgramVertex *pv, uint32_t slot, Allocation *a) {
64 pv->bindAllocation(rsc, a, slot);
67 void rsrBindSampler(Context *rsc, ProgramFragment *pf, uint32_t slot, Sampler *s) {
70 pf->bindSampler(rsc, slot, s);
73 void rsrBindProgramStore(Context *rsc, ProgramStore *ps) {
75 rsc->setProgramStore(ps);
78 void rsrBindProgramFragment(Context *rsc, ProgramFragment *pf) {
80 rsc->setProgramFragment(pf);
83 void rsrBindProgramVertex(Context *rsc, ProgramVertex *pv) {
85 rsc->setProgramVertex(pv);
88 void rsrBindProgramRaster(Context *rsc, ProgramRaster *pr) {
90 rsc->setProgramRaster(pr);
93 void rsrBindFrameBufferObjectColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
95 rsc->mFBOCache.bindColorTarget(rsc, a, slot);
96 rsc->mStateVertex.updateSize(rsc);
99 void rsrBindFrameBufferObjectDepthTarget(Context *rsc, Allocation *a) {
101 rsc->mFBOCache.bindDepthTarget(rsc, a);
102 rsc->mStateVertex.updateSize(rsc);
105 void rsrClearFrameBufferObjectColorTarget(Context *rsc, uint32_t slot) {
106 rsc->mFBOCache.bindColorTarget(rsc, nullptr, slot);
107 rsc->mStateVertex.updateSize(rsc);
110 void rsrClearFrameBufferObjectDepthTarget(Context *rsc) {
111 rsc->mFBOCache.bindDepthTarget(rsc, nullptr);
112 rsc->mStateVertex.updateSize(rsc);
115 void rsrClearFrameBufferObjectTargets(Context *rsc) {
116 rsc->mFBOCache.resetAll(rsc);
117 rsc->mStateVertex.updateSize(rsc);
124 void rsrVpLoadProjectionMatrix(Context *rsc, const rsc_Matrix *m) {
125 rsc->getProgramVertex()->setProjectionMatrix(rsc, m);
128 void rsrVpLoadModelMatrix(Context *rsc, const rsc_Matrix *m) {
129 rsc->getProgramVertex()->setModelviewMatrix(rsc, m);
132 void rsrVpLoadTextureMatrix(Context *rsc, const rsc_Matrix *m) {
133 rsc->getProgramVertex()->setTextureMatrix(rsc, m);
136 void rsrPfConstantColor(Context *rsc, ProgramFragment *pf,
139 pf->setConstantColor(rsc, r, g, b, a);
142 void rsrVpGetProjectionMatrix(Context *rsc, rsc_Matrix *m) {
143 rsc->getProgramVertex()->getProjectionMatrix(rsc, m);
151 void rsrDrawPath(Context *rsc, Path *sm) {
155 void rsrDrawMesh(Context *rsc, Mesh *sm) {
157 if (!rsc->setupCheck()) {
160 sm->render(rsc);
163 void rsrDrawMeshPrimitive(Context *rsc, Mesh *sm, uint32_t primIndex) {
165 if (!rsc->setupCheck()) {
168 sm->renderPrimitive(rsc, primIndex);
171 void rsrDrawMeshPrimitiveRange(Context *rsc, Mesh *sm, uint32_t primIndex,
174 if (!rsc->setupCheck()) {
177 sm->renderPrimitiveRange(rsc, primIndex, start, len);
180 void rsrMeshComputeBoundingBox(Context *rsc, Mesh *sm,
184 sm->computeBBox(rsc);
199 void rsrColor(Context *rsc, float r, float g, float b, float a) {
200 ProgramFragment *pf = rsc->getProgramFragment();
201 pf->setConstantColor(rsc, r, g, b, a);
204 void rsrPrepareClear(Context *rsc) {
205 rsc->mFBOCache.setup(rsc);
206 rsc->setupProgramStore();
209 uint32_t rsrGetWidth(Context *rsc) {
210 return rsc->getWidth();
213 uint32_t rsrGetHeight(Context *rsc) {
214 return rsc->getHeight();
217 void rsrDrawTextAlloc(Context *rsc, Allocation *a, int x, int y) {
218 const char *text = (const char *)rsc->mHal.funcs.allocation.lock1D(rsc, a);
220 rsc->mStateFont.renderText(text, allocSize, x, y);
221 rsc->mHal.funcs.allocation.unlock1D(rsc, a);
224 void rsrDrawText(Context *rsc, const char *text, int x, int y) {
226 rsc->mStateFont.renderText(text, textLen, x, y);
245 void rsrMeasureTextAlloc(Context *rsc, Allocation *a,
248 const char *text = (const char *)rsc->mHal.funcs.allocation.lock1D(rsc, a);
251 rsc->mStateFont.measureText(text, textLen, &metrics);
253 rsc->mHal.funcs.allocation.unlock1D(rsc, a);
256 void rsrMeasureText(Context *rsc, const char *text,
260 rsc->mStateFont.measureText(text, textLen, &metrics);
264 void rsrBindFont(Context *rsc, Font *font) {
266 rsi_ContextBindFont(rsc, font);
269 void rsrFontColor(Context *rsc, float r, float g, float b, float a) {
270 rsc->mStateFont.setFontColor(r, g, b, a);