Lines Matching refs:ctx

33         ctx->setError(err);                                    \
40 ctx->setError(err); \
46 GLEncoder *ctx = (GLEncoder *)self; in s_glGetError() local
47 GLenum err = ctx->getError(); in s_glGetError()
49 ctx->setError(GL_NO_ERROR); in s_glGetError()
53 return ctx->m_glGetError_enc(self); in s_glGetError()
73 GLEncoder *ctx = (GLEncoder *)self; in s_glGetIntegerv() local
74 assert(ctx->m_state != NULL); in s_glGetIntegerv()
75 GLClientState* state = ctx->m_state; in s_glGetIntegerv()
79 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetIntegerv()
80 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetIntegerv()
83 ctx->m_num_compressedTextureFormats * sizeof(GLint)); in s_glGetIntegerv()
89 ctx->m_glGetIntegerv_enc(self, param, ptr); in s_glGetIntegerv()
103 ctx->m_glGetIntegerv_enc(self, param, ptr); in s_glGetIntegerv()
111 GLEncoder *ctx = (GLEncoder *)self; in s_glGetFloatv() local
112 assert(ctx->m_state != NULL); in s_glGetFloatv()
113 GLClientState* state = ctx->m_state; in s_glGetFloatv()
117 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetFloatv()
118 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetFloatv()
120 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetFloatv()
128 ctx->m_glGetFloatv_enc(self, param, ptr); in s_glGetFloatv()
142 ctx->m_glGetFloatv_enc(self, param, ptr); in s_glGetFloatv()
150 GLEncoder *ctx = (GLEncoder *)self; in s_glGetFixedv() local
151 assert(ctx->m_state != NULL); in s_glGetFixedv()
152 GLClientState* state = ctx->m_state; in s_glGetFixedv()
156 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetFixedv()
157 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetFixedv()
159 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetFixedv()
167 ctx->m_glGetFixedv_enc(self, param, ptr); in s_glGetFixedv()
181 ctx->m_glGetFixedv_enc(self, param, ptr); in s_glGetFixedv()
189 GLEncoder *ctx = (GLEncoder *)self; in s_glGetBooleanv() local
190 assert(ctx->m_state != NULL); in s_glGetBooleanv()
191 GLClientState* state = ctx->m_state; in s_glGetBooleanv()
195 GLint* compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetBooleanv()
196 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetBooleanv()
198 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetBooleanv()
216 ctx->m_glGetBooleanv_enc(self, param, ptr); in s_glGetBooleanv()
224 GLEncoder * ctx = (GLEncoder *) self; in s_glGetPointerv() local
225 assert(ctx->m_state != NULL); in s_glGetPointerv()
226 ctx->m_state->getClientStatePointer(param,params); in s_glGetPointerv()
231 GLEncoder *ctx = (GLEncoder *)self; in s_glFlush() local
232 ctx->m_glFlush_enc(self); in s_glFlush()
233 ctx->m_stream->flush(); in s_glFlush()
260 GLEncoder *ctx = (GLEncoder *)self; in s_glPixelStorei() local
261 ctx->m_glPixelStorei_enc(ctx, param, value); in s_glPixelStorei()
262 ALOG_ASSERT(ctx->m_state, "GLEncoder::s_glPixelStorei"); in s_glPixelStorei()
263 ctx->m_state->setPixelStore(param, value); in s_glPixelStorei()
268 GLEncoder *ctx = (GLEncoder *)self; in s_glVertexPointer() local
269 assert(ctx->m_state != NULL); in s_glVertexPointer()
270 ctx->m_state->setState(GLClientState::VERTEX_LOCATION, size, type, false, stride, data); in s_glVertexPointer()
275 GLEncoder *ctx = (GLEncoder *)self; in s_glNormalPointer() local
276 assert(ctx->m_state != NULL); in s_glNormalPointer()
277 ctx->m_state->setState(GLClientState::NORMAL_LOCATION, 3, type, false, stride, data); in s_glNormalPointer()
282 GLEncoder *ctx = (GLEncoder *)self; in s_glColorPointer() local
283 assert(ctx->m_state != NULL); in s_glColorPointer()
284 ctx->m_state->setState(GLClientState::COLOR_LOCATION, size, type, false, stride, data); in s_glColorPointer()
289 GLEncoder *ctx = (GLEncoder *)self; in s_glPointSizePointerOES() local
290 assert(ctx->m_state != NULL); in s_glPointSizePointerOES()
291 ctx->m_state->setState(GLClientState::POINTSIZE_LOCATION, 1, type, false, stride, data); in s_glPointSizePointerOES()
296 GLEncoder *ctx = (GLEncoder *)self; in s_glClientActiveTexture() local
297 assert(ctx->m_state != NULL); in s_glClientActiveTexture()
298 ctx->m_state->setActiveTexture(texture - GL_TEXTURE0); in s_glClientActiveTexture()
303 GLEncoder *ctx = (GLEncoder *)self; in s_glTexCoordPointer() local
304 assert(ctx->m_state != NULL); in s_glTexCoordPointer()
305 int loc = ctx->m_state->getLocation(GL_TEXTURE_COORD_ARRAY); in s_glTexCoordPointer()
306 ctx->m_state->setState(loc, size, type, false, stride, data); in s_glTexCoordPointer()
311 GLEncoder *ctx = (GLEncoder *)self; in s_glMatrixIndexPointerOES() local
312 assert(ctx->m_state != NULL); in s_glMatrixIndexPointerOES()
313 int loc = ctx->m_state->getLocation(GL_MATRIX_INDEX_ARRAY_OES); in s_glMatrixIndexPointerOES()
314 ctx->m_state->setState(loc, size, type, false, stride, data); in s_glMatrixIndexPointerOES()
319 GLEncoder *ctx = (GLEncoder *)self; in s_glWeightPointerOES() local
320 assert(ctx->m_state != NULL); in s_glWeightPointerOES()
321 int loc = ctx->m_state->getLocation(GL_WEIGHT_ARRAY_OES); in s_glWeightPointerOES()
322 ctx->m_state->setState(loc, size, type, false, stride, data); in s_glWeightPointerOES()
327 GLEncoder *ctx = (GLEncoder *) self; in s_glEnableClientState() local
328 assert(ctx->m_state != NULL); in s_glEnableClientState()
329 int loc = ctx->m_state->getLocation(state); in s_glEnableClientState()
330 ctx->m_state->enable(loc, 1); in s_glEnableClientState()
335 GLEncoder *ctx = (GLEncoder *) self; in s_glDisableClientState() local
336 assert(ctx->m_state != NULL); in s_glDisableClientState()
337 int loc = ctx->m_state->getLocation(state); in s_glDisableClientState()
338 ctx->m_state->enable(loc, 0); in s_glDisableClientState()
343 GLEncoder *ctx = (GLEncoder *) self; in s_glIsEnabled() local
344 assert(ctx->m_state != NULL); in s_glIsEnabled()
345 int loc = ctx->m_state->getLocation(cap); in s_glIsEnabled()
346 const GLClientState::VertexAttribState *state = ctx->m_state->getState(loc); in s_glIsEnabled()
351 return ctx->m_glIsEnabled_enc(self,cap); in s_glIsEnabled()
356 GLEncoder *ctx = (GLEncoder *) self; in s_glBindBuffer() local
357 assert(ctx->m_state != NULL); in s_glBindBuffer()
358 ctx->m_state->bindBuffer(target, id); in s_glBindBuffer()
360 ctx->m_glBindBuffer_enc(self, target, id); in s_glBindBuffer()
365 GLEncoder *ctx = (GLEncoder *) self; in s_glBufferData() local
366 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferData()
370 ctx->m_shared->updateBufferData(bufferId, size, (void*)data); in s_glBufferData()
371 ctx->m_glBufferData_enc(self, target, size, data, usage); in s_glBufferData()
376 GLEncoder *ctx = (GLEncoder *) self; in s_glBufferSubData() local
377 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferSubData()
380 GLenum res = ctx->m_shared->subUpdateBufferData(bufferId, offset, size, (void*)data); in s_glBufferSubData()
383 ctx->m_glBufferSubData_enc(self, target, offset, size, data); in s_glBufferSubData()
388 GLEncoder *ctx = (GLEncoder *) self; in s_glDeleteBuffers() local
391 ctx->m_shared->deleteBufferData(buffers[i]); in s_glDeleteBuffers()
392 ctx->m_glDeleteBuffers_enc(self,1,&buffers[i]); in s_glDeleteBuffers()
513 GLEncoder *ctx = (GLEncoder *)self; in s_glDrawArrays() local
517 const GLClientState::VertexAttribState *state = ctx->m_state->getState(i); in s_glDrawArrays()
523 ctx->setError(GL_INVALID_OPERATION); in s_glDrawArrays()
533 ctx->sendVertexData(first, count); in s_glDrawArrays()
534 ctx->m_glDrawArrays_enc(ctx, mode, /*first*/ 0, count); in s_glDrawArrays()
540 GLEncoder *ctx = (GLEncoder *)self; in s_glDrawElements() local
541 assert(ctx->m_state != NULL); in s_glDrawElements()
548 const GLClientState::VertexAttribState *state = ctx->m_state->getState(i); in s_glDrawElements()
556 ctx->setError(GL_INVALID_OPERATION); in s_glDrawElements()
568 if (ctx->m_state->currentIndexVbo() != 0) { in s_glDrawElements()
570 ctx->sendVertexData(0, count); in s_glDrawElements()
571 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, ctx->m_state->currentIndexVbo()); in s_glDrawElements()
572 ctx->glDrawElementsOffset(ctx, mode, count, type, (uintptr_t)indices); in s_glDrawElements()
575 BufferData * buf = ctx->m_shared->getBufferData(ctx->m_state->currentIndexVbo()); in s_glDrawElements()
576 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, 0); in s_glDrawElements()
589 adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count); in s_glDrawElements()
599 adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count); in s_glDrawElements()
609 adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count); in s_glDrawElements()
619 ctx->sendVertexData(minIndex, maxIndex - minIndex + 1); in s_glDrawElements()
620 ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices, in s_glDrawElements()
636 GLEncoder* ctx = (GLEncoder*)self; in s_glActiveTexture() local
637 GLClientState* state = ctx->m_state; in s_glActiveTexture()
642 ctx->setError(err); in s_glActiveTexture()
646 ctx->m_glActiveTexture_enc(ctx, texture); in s_glActiveTexture()
651 GLEncoder* ctx = (GLEncoder*)self; in s_glBindTexture() local
652 GLClientState* state = ctx->m_state; in s_glBindTexture()
658 ctx->setError(err); in s_glBindTexture()
663 ctx->m_glBindTexture_enc(ctx, target, texture); in s_glBindTexture()
671 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture); in s_glBindTexture()
672 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
674 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
676 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
680 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
686 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture); in s_glBindTexture()
692 GLEncoder* ctx = (GLEncoder*)self; in s_glDeleteTextures() local
693 GLClientState* state = ctx->m_state; in s_glDeleteTextures()
696 ctx->m_glDeleteTextures_enc(ctx, n, textures); in s_glDeleteTextures()
701 GLEncoder* ctx = (GLEncoder*)self; in s_glDisable() local
702 GLClientState* state = ctx->m_state; in s_glDisable()
711 ctx->m_glDisable_enc(ctx, GL_TEXTURE_2D); in s_glDisable()
717 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glDisable()
722 ctx->m_glDisable_enc(ctx, cap); in s_glDisable()
728 GLEncoder* ctx = (GLEncoder*)self; in s_glEnable() local
729 GLClientState* state = ctx->m_state; in s_glEnable()
738 ctx->m_glEnable_enc(ctx, GL_TEXTURE_2D); in s_glEnable()
741 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glEnable()
747 ctx->m_glEnable_enc(ctx, cap); in s_glEnable()
754 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameterfv() local
755 const GLClientState* state = ctx->m_state; in s_glGetTexParameterfv()
758 ctx->override2DTextureTarget(target); in s_glGetTexParameterfv()
759 ctx->m_glGetTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameterfv()
760 ctx->restore2DTextureTarget(); in s_glGetTexParameterfv()
762 ctx->m_glGetTexParameterfv_enc(ctx, target, pname, params); in s_glGetTexParameterfv()
769 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameteriv() local
770 const GLClientState* state = ctx->m_state; in s_glGetTexParameteriv()
779 ctx->override2DTextureTarget(target); in s_glGetTexParameteriv()
780 ctx->m_glGetTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameteriv()
781 ctx->restore2DTextureTarget(); in s_glGetTexParameteriv()
783 ctx->m_glGetTexParameteriv_enc(ctx, target, pname, params); in s_glGetTexParameteriv()
792 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameterxv() local
793 const GLClientState* state = ctx->m_state; in s_glGetTexParameterxv()
796 ctx->override2DTextureTarget(target); in s_glGetTexParameterxv()
797 ctx->m_glGetTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameterxv()
798 ctx->restore2DTextureTarget(); in s_glGetTexParameterxv()
800 ctx->m_glGetTexParameterxv_enc(ctx, target, pname, params); in s_glGetTexParameterxv()
826 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterf() local
827 const GLClientState* state = ctx->m_state; in s_glTexParameterf()
834 ctx->override2DTextureTarget(target); in s_glTexParameterf()
835 ctx->m_glTexParameterf_enc(ctx, GL_TEXTURE_2D, pname, param); in s_glTexParameterf()
836 ctx->restore2DTextureTarget(); in s_glTexParameterf()
838 ctx->m_glTexParameterf_enc(ctx, target, pname, param); in s_glTexParameterf()
845 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterfv() local
846 const GLClientState* state = ctx->m_state; in s_glTexParameterfv()
853 ctx->override2DTextureTarget(target); in s_glTexParameterfv()
854 ctx->m_glTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameterfv()
855 ctx->restore2DTextureTarget(); in s_glTexParameterfv()
857 ctx->m_glTexParameterfv_enc(ctx, target, pname, params); in s_glTexParameterfv()
864 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameteri() local
865 const GLClientState* state = ctx->m_state; in s_glTexParameteri()
872 ctx->override2DTextureTarget(target); in s_glTexParameteri()
873 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, pname, param); in s_glTexParameteri()
874 ctx->restore2DTextureTarget(); in s_glTexParameteri()
876 ctx->m_glTexParameteri_enc(ctx, target, pname, param); in s_glTexParameteri()
883 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterx() local
884 const GLClientState* state = ctx->m_state; in s_glTexParameterx()
891 ctx->override2DTextureTarget(target); in s_glTexParameterx()
892 ctx->m_glTexParameterx_enc(ctx, GL_TEXTURE_2D, pname, param); in s_glTexParameterx()
893 ctx->restore2DTextureTarget(); in s_glTexParameterx()
895 ctx->m_glTexParameterx_enc(ctx, target, pname, param); in s_glTexParameterx()
902 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameteriv() local
903 const GLClientState* state = ctx->m_state; in s_glTexParameteriv()
910 ctx->override2DTextureTarget(target); in s_glTexParameteriv()
911 ctx->m_glTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameteriv()
912 ctx->restore2DTextureTarget(); in s_glTexParameteriv()
914 ctx->m_glTexParameteriv_enc(ctx, target, pname, params); in s_glTexParameteriv()
921 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterxv() local
922 const GLClientState* state = ctx->m_state; in s_glTexParameterxv()
929 ctx->override2DTextureTarget(target); in s_glTexParameterxv()
930 ctx->m_glTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameterxv()
931 ctx->restore2DTextureTarget(); in s_glTexParameterxv()
933 ctx->m_glTexParameterxv_enc(ctx, target, pname, params); in s_glTexParameterxv()
1027 GLEncoder *ctx = (GLEncoder *)self; in s_glFinish() local
1028 ctx->glFinishRoundTrip(self); in s_glFinish()