Lines Matching refs:ctx
33 ctx->setError(err); \
40 ctx->setError(err); \
46 GLEncoder *ctx = (GLEncoder *)self;
47 GLenum err = ctx->getError();
49 ctx->setError(GL_NO_ERROR);
53 return ctx->m_glGetError_enc(self);
73 GLEncoder *ctx = (GLEncoder *)self;
74 assert(ctx->m_state != NULL);
75 GLClientState* state = ctx->m_state;
79 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats();
80 if (ctx->m_num_compressedTextureFormats > 0 &&
83 ctx->m_num_compressedTextureFormats * sizeof(GLint));
89 ctx->m_glGetIntegerv_enc(self, param, ptr);
103 ctx->m_glGetIntegerv_enc(self, param, ptr);
111 GLEncoder *ctx = (GLEncoder *)self;
112 assert(ctx->m_state != NULL);
113 GLClientState* state = ctx->m_state;
117 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats();
118 if (ctx->m_num_compressedTextureFormats > 0 &&
120 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) {
128 ctx->m_glGetFloatv_enc(self, param, ptr);
142 ctx->m_glGetFloatv_enc(self, param, ptr);
150 GLEncoder *ctx = (GLEncoder *)self;
151 assert(ctx->m_state != NULL);
152 GLClientState* state = ctx->m_state;
156 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats();
157 if (ctx->m_num_compressedTextureFormats > 0 &&
159 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) {
167 ctx->m_glGetFixedv_enc(self, param, ptr);
181 ctx->m_glGetFixedv_enc(self, param, ptr);
189 GLEncoder *ctx = (GLEncoder *)self;
190 assert(ctx->m_state != NULL);
191 GLClientState* state = ctx->m_state;
195 GLint* compressedTextureFormats = ctx->getCompressedTextureFormats();
196 if (ctx->m_num_compressedTextureFormats > 0 &&
198 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) {
216 ctx->m_glGetBooleanv_enc(self, param, ptr);
224 GLEncoder * ctx = (GLEncoder *) self;
225 assert(ctx->m_state != NULL);
226 ctx->m_state->getClientStatePointer(param,params);
231 GLEncoder *ctx = (GLEncoder *)self;
232 ctx->m_glFlush_enc(self);
233 ctx->m_stream->flush();
258 GLEncoder *ctx = (GLEncoder *)self;
259 ctx->m_glPixelStorei_enc(ctx, param, value);
260 ALOG_ASSERT(ctx->m_state, "GLEncoder::s_glPixelStorei");
261 ctx->m_state->setPixelStore(param, value);
266 GLEncoder *ctx = (GLEncoder *)self;
267 assert(ctx->m_state != NULL);
268 ctx->m_state->setState(GLClientState::VERTEX_LOCATION, size, type, false, stride, data);
273 GLEncoder *ctx = (GLEncoder *)self;
274 assert(ctx->m_state != NULL);
275 ctx->m_state->setState(GLClientState::NORMAL_LOCATION, 3, type, false, stride, data);
280 GLEncoder *ctx = (GLEncoder *)self;
281 assert(ctx->m_state != NULL);
282 ctx->m_state->setState(GLClientState::COLOR_LOCATION, size, type, false, stride, data);
287 GLEncoder *ctx = (GLEncoder *)self;
288 assert(ctx->m_state != NULL);
289 ctx->m_state->setState(GLClientState::POINTSIZE_LOCATION, 1, type, false, stride, data);
294 GLEncoder *ctx = (GLEncoder *)self;
295 assert(ctx->m_state != NULL);
296 ctx->m_state->setActiveTexture(texture - GL_TEXTURE0);
301 GLEncoder *ctx = (GLEncoder *)self;
302 assert(ctx->m_state != NULL);
303 int loc = ctx->m_state->getLocation(GL_TEXTURE_COORD_ARRAY);
304 ctx->m_state->setState(loc, size, type, false, stride, data);
309 GLEncoder *ctx = (GLEncoder *)self;
310 assert(ctx->m_state != NULL);
311 int loc = ctx->m_state->getLocation(GL_MATRIX_INDEX_ARRAY_OES);
312 ctx->m_state->setState(loc, size, type, false, stride, data);
317 GLEncoder *ctx = (GLEncoder *)self;
318 assert(ctx->m_state != NULL);
319 int loc = ctx->m_state->getLocation(GL_WEIGHT_ARRAY_OES);
320 ctx->m_state->setState(loc, size, type, false, stride, data);
325 GLEncoder *ctx = (GLEncoder *) self;
326 assert(ctx->m_state != NULL);
327 int loc = ctx->m_state->getLocation(state);
328 ctx->m_state->enable(loc, 1);
333 GLEncoder *ctx = (GLEncoder *) self;
334 assert(ctx->m_state != NULL);
335 int loc = ctx->m_state->getLocation(state);
336 ctx->m_state->enable(loc, 0);
341 GLEncoder *ctx = (GLEncoder *) self;
342 assert(ctx->m_state != NULL);
343 int loc = ctx->m_state->getLocation(cap);
344 const GLClientState::VertexAttribState *state = ctx->m_state->getState(loc);
349 return ctx->m_glIsEnabled_enc(self,cap);
354 GLEncoder *ctx = (GLEncoder *) self;
355 assert(ctx->m_state != NULL);
356 ctx->m_state->bindBuffer(target, id);
358 ctx->m_glBindBuffer_enc(self, target, id);
363 GLEncoder *ctx = (GLEncoder *) self;
364 GLuint bufferId = ctx->m_state->getBuffer(target);
368 ctx->m_shared->updateBufferData(bufferId, size, (void*)data);
369 ctx->m_glBufferData_enc(self, target, size, data, usage);
374 GLEncoder *ctx = (GLEncoder *) self;
375 GLuint bufferId = ctx->m_state->getBuffer(target);
378 GLenum res = ctx->m_shared->subUpdateBufferData(bufferId, offset, size, (void*)data);
381 ctx->m_glBufferSubData_enc(self, target, offset, size, data);
386 GLEncoder *ctx = (GLEncoder *) self;
389 ctx->m_shared->deleteBufferData(buffers[i]);
390 ctx->m_glDeleteBuffers_enc(self,1,&buffers[i]);
511 GLEncoder *ctx = (GLEncoder *)self;
513 ctx->sendVertexData(first, count);
514 ctx->m_glDrawArrays_enc(ctx, mode, /*first*/ 0, count);
520 GLEncoder *ctx = (GLEncoder *)self;
521 assert(ctx->m_state != NULL);
528 const GLClientState::VertexAttribState *state = ctx->m_state->getState(i);
544 if (ctx->m_state->currentIndexVbo() != 0) {
546 ctx->sendVertexData(0, count);
547 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, ctx->m_state->currentIndexVbo());
548 ctx->glDrawElementsOffset(ctx, mode, count, type, (GLuint)indices);
551 BufferData * buf = ctx->m_shared->getBufferData(ctx->m_state->currentIndexVbo());
552 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, 0);
565 adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count);
575 adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count);
585 ctx->sendVertexData(minIndex, maxIndex - minIndex + 1);
586 ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices,
602 GLEncoder* ctx = (GLEncoder*)self;
603 GLClientState* state = ctx->m_state;
608 ctx->setError(err);
612 ctx->m_glActiveTexture_enc(ctx, texture);
617 GLEncoder* ctx = (GLEncoder*)self;
618 GLClientState* state = ctx->m_state;
624 ctx->setError(err);
629 ctx->m_glBindTexture_enc(ctx, target, texture);
637 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture);
638 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D,
640 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D,
642 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D,
646 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D,
652 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture);
658 GLEncoder* ctx = (GLEncoder*)self;
659 GLClientState* state = ctx->m_state;
662 ctx->m_glDeleteTextures_enc(ctx, n, textures);
667 GLEncoder* ctx = (GLEncoder*)self;
668 GLClientState* state = ctx->m_state;
677 ctx->m_glDisable_enc(ctx, GL_TEXTURE_2D);
683 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D,
688 ctx->m_glDisable_enc(ctx, cap);
694 GLEncoder* ctx = (GLEncoder*)self;
695 GLClientState* state = ctx->m_state;
704 ctx->m_glEnable_enc(ctx, GL_TEXTURE_2D);
707 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D,
713 ctx->m_glEnable_enc(ctx, cap);
720 GLEncoder* ctx = (GLEncoder*)self;
721 const GLClientState* state = ctx->m_state;
724 ctx->override2DTextureTarget(target);
725 ctx->m_glGetTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params);
726 ctx->restore2DTextureTarget();
728 ctx->m_glGetTexParameterfv_enc(ctx, target, pname, params);
735 GLEncoder* ctx = (GLEncoder*)self;
736 const GLClientState* state = ctx->m_state;
745 ctx->override2DTextureTarget(target);
746 ctx->m_glGetTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params);
747 ctx->restore2DTextureTarget();
749 ctx->m_glGetTexParameteriv_enc(ctx, target, pname, params);
758 GLEncoder* ctx = (GLEncoder*)self;
759 const GLClientState* state = ctx->m_state;
762 ctx->override2DTextureTarget(target);
763 ctx->m_glGetTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params);
764 ctx->restore2DTextureTarget();
766 ctx->m_glGetTexParameterxv_enc(ctx, target, pname, params);
792 GLEncoder* ctx = (GLEncoder*)self;
793 const GLClientState* state = ctx->m_state;
800 ctx->override2DTextureTarget(target);
801 ctx->m_glTexParameterf_enc(ctx, GL_TEXTURE_2D, pname, param);
802 ctx->restore2DTextureTarget();
804 ctx->m_glTexParameterf_enc(ctx, target, pname, param);
811 GLEncoder* ctx = (GLEncoder*)self;
812 const GLClientState* state = ctx->m_state;
819 ctx->override2DTextureTarget(target);
820 ctx->m_glTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params);
821 ctx->restore2DTextureTarget();
823 ctx->m_glTexParameterfv_enc(ctx, target, pname, params);
830 GLEncoder* ctx = (GLEncoder*)self;
831 const GLClientState* state = ctx->m_state;
838 ctx->override2DTextureTarget(target);
839 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, pname, param);
840 ctx->restore2DTextureTarget();
842 ctx->m_glTexParameteri_enc(ctx, target, pname, param);
849 GLEncoder* ctx = (GLEncoder*)self;
850 const GLClientState* state = ctx->m_state;
857 ctx->override2DTextureTarget(target);
858 ctx->m_glTexParameterx_enc(ctx, GL_TEXTURE_2D, pname, param);
859 ctx->restore2DTextureTarget();
861 ctx->m_glTexParameterx_enc(ctx, target, pname, param);
868 GLEncoder* ctx = (GLEncoder*)self;
869 const GLClientState* state = ctx->m_state;
876 ctx->override2DTextureTarget(target);
877 ctx->m_glTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params);
878 ctx->restore2DTextureTarget();
880 ctx->m_glTexParameteriv_enc(ctx, target, pname, params);
887 GLEncoder* ctx = (GLEncoder*)self;
888 const GLClientState* state = ctx->m_state;
895 ctx->override2DTextureTarget(target);
896 ctx->m_glTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params);
897 ctx->restore2DTextureTarget();
899 ctx->m_glTexParameterxv_enc(ctx, target, pname, params);
987 GLEncoder *ctx = (GLEncoder *)self;
988 ctx->glFinishRoundTrip(self);