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()
108 ctx->m_glGetIntegerv_enc(self, param, ptr); in s_glGetIntegerv()
116 GLEncoder *ctx = (GLEncoder *)self; in s_glGetFloatv() local
117 assert(ctx->m_state != NULL); in s_glGetFloatv()
118 GLClientState* state = ctx->m_state; in s_glGetFloatv()
122 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetFloatv()
123 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetFloatv()
125 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetFloatv()
133 ctx->m_glGetFloatv_enc(self, param, ptr); in s_glGetFloatv()
147 ctx->m_glGetFloatv_enc(self, param, ptr); in s_glGetFloatv()
155 GLEncoder *ctx = (GLEncoder *)self; in s_glGetFixedv() local
156 assert(ctx->m_state != NULL); in s_glGetFixedv()
157 GLClientState* state = ctx->m_state; in s_glGetFixedv()
161 GLint * compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetFixedv()
162 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetFixedv()
164 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetFixedv()
172 ctx->m_glGetFixedv_enc(self, param, ptr); in s_glGetFixedv()
186 ctx->m_glGetFixedv_enc(self, param, ptr); in s_glGetFixedv()
194 GLEncoder *ctx = (GLEncoder *)self; in s_glGetBooleanv() local
195 assert(ctx->m_state != NULL); in s_glGetBooleanv()
196 GLClientState* state = ctx->m_state; in s_glGetBooleanv()
200 GLint* compressedTextureFormats = ctx->getCompressedTextureFormats(); in s_glGetBooleanv()
201 if (ctx->m_num_compressedTextureFormats > 0 && in s_glGetBooleanv()
203 for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) { in s_glGetBooleanv()
221 ctx->m_glGetBooleanv_enc(self, param, ptr); in s_glGetBooleanv()
229 GLEncoder * ctx = (GLEncoder *) self; in s_glGetPointerv() local
230 assert(ctx->m_state != NULL); in s_glGetPointerv()
231 ctx->m_state->getClientStatePointer(param,params); in s_glGetPointerv()
236 GLEncoder *ctx = (GLEncoder *)self; in s_glFlush() local
237 ctx->m_glFlush_enc(self); in s_glFlush()
238 ctx->m_stream->flush(); in s_glFlush()
265 GLEncoder *ctx = (GLEncoder *)self; in s_glPixelStorei() local
266 ctx->m_glPixelStorei_enc(ctx, param, value); in s_glPixelStorei()
267 ALOG_ASSERT(ctx->m_state, "GLEncoder::s_glPixelStorei"); in s_glPixelStorei()
268 ctx->m_state->setPixelStore(param, value); in s_glPixelStorei()
273 GLEncoder *ctx = (GLEncoder *)self; in s_glVertexPointer() local
274 assert(ctx->m_state != NULL); in s_glVertexPointer()
275ctx->m_state->setVertexAttribState(GLClientState::VERTEX_LOCATION, size, type, false, stride, data… in s_glVertexPointer()
280 GLEncoder *ctx = (GLEncoder *)self; in s_glNormalPointer() local
281 assert(ctx->m_state != NULL); in s_glNormalPointer()
282ctx->m_state->setVertexAttribState(GLClientState::NORMAL_LOCATION, 3, type, false, stride, data); in s_glNormalPointer()
287 GLEncoder *ctx = (GLEncoder *)self; in s_glColorPointer() local
288 assert(ctx->m_state != NULL); in s_glColorPointer()
289ctx->m_state->setVertexAttribState(GLClientState::COLOR_LOCATION, size, type, false, stride, data); in s_glColorPointer()
294 GLEncoder *ctx = (GLEncoder *)self; in s_glPointSizePointerOES() local
295 assert(ctx->m_state != NULL); in s_glPointSizePointerOES()
296ctx->m_state->setVertexAttribState(GLClientState::POINTSIZE_LOCATION, 1, type, false, stride, data… in s_glPointSizePointerOES()
301 GLEncoder *ctx = (GLEncoder *)self; in s_glClientActiveTexture() local
302 assert(ctx->m_state != NULL); in s_glClientActiveTexture()
303 ctx->m_state->setActiveTexture(texture - GL_TEXTURE0); in s_glClientActiveTexture()
308 GLEncoder *ctx = (GLEncoder *)self; in s_glTexCoordPointer() local
309 assert(ctx->m_state != NULL); in s_glTexCoordPointer()
310 int loc = ctx->m_state->getLocation(GL_TEXTURE_COORD_ARRAY); in s_glTexCoordPointer()
311 ctx->m_state->setVertexAttribState(loc, size, type, false, stride, data); in s_glTexCoordPointer()
316 GLEncoder *ctx = (GLEncoder *)self; in s_glMatrixIndexPointerOES() local
317 assert(ctx->m_state != NULL); in s_glMatrixIndexPointerOES()
318 int loc = ctx->m_state->getLocation(GL_MATRIX_INDEX_ARRAY_OES); in s_glMatrixIndexPointerOES()
319 ctx->m_state->setVertexAttribState(loc, size, type, false, stride, data); in s_glMatrixIndexPointerOES()
324 GLEncoder *ctx = (GLEncoder *)self; in s_glWeightPointerOES() local
325 assert(ctx->m_state != NULL); in s_glWeightPointerOES()
326 int loc = ctx->m_state->getLocation(GL_WEIGHT_ARRAY_OES); in s_glWeightPointerOES()
327 ctx->m_state->setVertexAttribState(loc, size, type, false, stride, data); in s_glWeightPointerOES()
332 GLEncoder *ctx = (GLEncoder *) self; in s_glEnableClientState() local
333 assert(ctx->m_state != NULL); in s_glEnableClientState()
334 int loc = ctx->m_state->getLocation(state); in s_glEnableClientState()
335 ctx->m_state->enable(loc, 1); in s_glEnableClientState()
340 GLEncoder *ctx = (GLEncoder *) self; in s_glDisableClientState() local
341 assert(ctx->m_state != NULL); in s_glDisableClientState()
342 int loc = ctx->m_state->getLocation(state); in s_glDisableClientState()
343 ctx->m_state->enable(loc, 0); in s_glDisableClientState()
348 GLEncoder *ctx = (GLEncoder *) self; in s_glIsEnabled() local
349 assert(ctx->m_state != NULL); in s_glIsEnabled()
350 int loc = ctx->m_state->getLocation(cap); in s_glIsEnabled()
351 const GLClientState::VertexAttribState& state = ctx->m_state->getState(loc); in s_glIsEnabled()
357 GLEncoder *ctx = (GLEncoder *) self; in s_glBindBuffer() local
358 assert(ctx->m_state != NULL); in s_glBindBuffer()
359 ctx->m_state->bindBuffer(target, id); in s_glBindBuffer()
361 ctx->m_glBindBuffer_enc(self, target, id); in s_glBindBuffer()
366 GLEncoder *ctx = (GLEncoder *) self; in s_glBufferData() local
367 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferData()
371 ctx->m_shared->updateBufferData(bufferId, size, (void*)data); in s_glBufferData()
372 ctx->m_glBufferData_enc(self, target, size, data, usage); in s_glBufferData()
377 GLEncoder *ctx = (GLEncoder *) self; in s_glBufferSubData() local
378 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferSubData()
381 GLenum res = ctx->m_shared->subUpdateBufferData(bufferId, offset, size, (void*)data); in s_glBufferSubData()
384 ctx->m_glBufferSubData_enc(self, target, offset, size, data); in s_glBufferSubData()
389 GLEncoder *ctx = (GLEncoder *) self; in s_glDeleteBuffers() local
392 ctx->m_shared->deleteBufferData(buffers[i]); in s_glDeleteBuffers()
393 ctx->m_glDeleteBuffers_enc(self,1,&buffers[i]); in s_glDeleteBuffers()
515 GLEncoder *ctx = (GLEncoder *)self; in s_glDrawArrays() local
519 const GLClientState::VertexAttribState& state = ctx->m_state->getState(i); in s_glDrawArrays()
525 ctx->setError(GL_INVALID_OPERATION); in s_glDrawArrays()
535 ctx->sendVertexData(first, count); in s_glDrawArrays()
536 ctx->m_glDrawArrays_enc(ctx, mode, /*first*/ 0, count); in s_glDrawArrays()
537 ctx->m_stream->flush(); in s_glDrawArrays()
543 GLEncoder *ctx = (GLEncoder *)self; in s_glDrawElements() local
544 assert(ctx->m_state != NULL); in s_glDrawElements()
551 const GLClientState::VertexAttribState& state = ctx->m_state->getState(i); in s_glDrawElements()
559 ctx->setError(GL_INVALID_OPERATION); in s_glDrawElements()
571 if (ctx->m_state->currentIndexVbo() != 0) { in s_glDrawElements()
573 ctx->sendVertexData(0, count); in s_glDrawElements()
574 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, ctx->m_state->currentIndexVbo()); in s_glDrawElements()
575 ctx->glDrawElementsOffset(ctx, mode, count, type, (uintptr_t)indices); in s_glDrawElements()
576 ctx->m_stream->flush(); in s_glDrawElements()
579 BufferData * buf = ctx->m_shared->getBufferData(ctx->m_state->currentIndexVbo()); in s_glDrawElements()
580 ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, 0); in s_glDrawElements()
593 ctx->m_fixedBuffer.resize(glSizeof(type) * count); in s_glDrawElements()
594 adjustedIndices = ctx->m_fixedBuffer.data(); in s_glDrawElements()
604 ctx->m_fixedBuffer.resize(glSizeof(type) * count); in s_glDrawElements()
605 adjustedIndices = ctx->m_fixedBuffer.data(); in s_glDrawElements()
615 ctx->m_fixedBuffer.resize(glSizeof(type) * count); in s_glDrawElements()
616 adjustedIndices = ctx->m_fixedBuffer.data(); in s_glDrawElements()
626 ctx->sendVertexData(minIndex, maxIndex - minIndex + 1); in s_glDrawElements()
627 ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices, in s_glDrawElements()
629 ctx->m_stream->flush(); in s_glDrawElements()
644 GLEncoder* ctx = (GLEncoder*)self; in s_glActiveTexture() local
645 GLClientState* state = ctx->m_state; in s_glActiveTexture()
650 ctx->setError(err); in s_glActiveTexture()
654 ctx->m_glActiveTexture_enc(ctx, texture); in s_glActiveTexture()
659 GLEncoder* ctx = (GLEncoder*)self; in s_glBindTexture() local
660 GLClientState* state = ctx->m_state; in s_glBindTexture()
666 ctx->setError(err); in s_glBindTexture()
671 ctx->m_glBindTexture_enc(ctx, target, texture); in s_glBindTexture()
679 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture); in s_glBindTexture()
680 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
682 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
684 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
688 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glBindTexture()
694 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, texture); in s_glBindTexture()
700 GLEncoder* ctx = (GLEncoder*)self; in s_glDeleteTextures() local
701 GLClientState* state = ctx->m_state; in s_glDeleteTextures()
704 ctx->m_glDeleteTextures_enc(ctx, n, textures); in s_glDeleteTextures()
709 GLEncoder* ctx = (GLEncoder*)self; in s_glDisable() local
710 GLClientState* state = ctx->m_state; in s_glDisable()
719 ctx->m_glDisable_enc(ctx, GL_TEXTURE_2D); in s_glDisable()
725 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glDisable()
730 ctx->m_glDisable_enc(ctx, cap); in s_glDisable()
736 GLEncoder* ctx = (GLEncoder*)self; in s_glEnable() local
737 GLClientState* state = ctx->m_state; in s_glEnable()
746 ctx->m_glEnable_enc(ctx, GL_TEXTURE_2D); in s_glEnable()
749 ctx->m_glBindTexture_enc(ctx, GL_TEXTURE_2D, in s_glEnable()
755 ctx->m_glEnable_enc(ctx, cap); in s_glEnable()
762 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameterfv() local
764 ctx->override2DTextureTarget(target); in s_glGetTexParameterfv()
765 ctx->m_glGetTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameterfv()
766 ctx->restore2DTextureTarget(); in s_glGetTexParameterfv()
768 ctx->m_glGetTexParameterfv_enc(ctx, target, pname, params); in s_glGetTexParameterfv()
775 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameteriv() local
784 ctx->override2DTextureTarget(target); in s_glGetTexParameteriv()
785 ctx->m_glGetTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameteriv()
786 ctx->restore2DTextureTarget(); in s_glGetTexParameteriv()
788 ctx->m_glGetTexParameteriv_enc(ctx, target, pname, params); in s_glGetTexParameteriv()
797 GLEncoder* ctx = (GLEncoder*)self; in s_glGetTexParameterxv() local
800 ctx->override2DTextureTarget(target); in s_glGetTexParameterxv()
801 ctx->m_glGetTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glGetTexParameterxv()
802 ctx->restore2DTextureTarget(); in s_glGetTexParameterxv()
804 ctx->m_glGetTexParameterxv_enc(ctx, target, pname, params); in s_glGetTexParameterxv()
830 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterf() local
837 ctx->override2DTextureTarget(target); in s_glTexParameterf()
838 ctx->m_glTexParameterf_enc(ctx, GL_TEXTURE_2D, pname, param); in s_glTexParameterf()
839 ctx->restore2DTextureTarget(); in s_glTexParameterf()
841 ctx->m_glTexParameterf_enc(ctx, target, pname, param); in s_glTexParameterf()
848 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterfv() local
855 ctx->override2DTextureTarget(target); in s_glTexParameterfv()
856 ctx->m_glTexParameterfv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameterfv()
857 ctx->restore2DTextureTarget(); in s_glTexParameterfv()
859 ctx->m_glTexParameterfv_enc(ctx, target, pname, params); in s_glTexParameterfv()
866 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameteri() local
873 ctx->override2DTextureTarget(target); in s_glTexParameteri()
874 ctx->m_glTexParameteri_enc(ctx, GL_TEXTURE_2D, pname, param); in s_glTexParameteri()
875 ctx->restore2DTextureTarget(); in s_glTexParameteri()
877 ctx->m_glTexParameteri_enc(ctx, target, pname, param); in s_glTexParameteri()
884 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterx() local
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
909 ctx->override2DTextureTarget(target); in s_glTexParameteriv()
910 ctx->m_glTexParameteriv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameteriv()
911 ctx->restore2DTextureTarget(); in s_glTexParameteriv()
913 ctx->m_glTexParameteriv_enc(ctx, target, pname, params); in s_glTexParameteriv()
920 GLEncoder* ctx = (GLEncoder*)self; in s_glTexParameterxv() local
927 ctx->override2DTextureTarget(target); in s_glTexParameterxv()
928 ctx->m_glTexParameterxv_enc(ctx, GL_TEXTURE_2D, pname, params); in s_glTexParameterxv()
929 ctx->restore2DTextureTarget(); in s_glTexParameterxv()
931 ctx->m_glTexParameterxv_enc(ctx, target, pname, params); in s_glTexParameterxv()
953 GLEncoder* ctx = (GLEncoder*)self; in s_glGenFramebuffersOES() local
954 GLClientState* state = ctx->m_state; in s_glGenFramebuffersOES()
958 ctx->m_glGenFramebuffersOES_enc(self, n, framebuffers); in s_glGenFramebuffersOES()
964 GLEncoder* ctx = (GLEncoder*)self; in s_glDeleteFramebuffersOES() local
965 GLClientState* state = ctx->m_state; in s_glDeleteFramebuffersOES()
969 ctx->m_glDeleteFramebuffersOES_enc(self, n, framebuffers); in s_glDeleteFramebuffersOES()
975 GLEncoder* ctx = (GLEncoder*)self; in s_glBindFramebufferOES() local
976 GLClientState* state = ctx->m_state; in s_glBindFramebufferOES()
983 ctx->m_glBindFramebufferOES_enc(self, target, framebuffer); in s_glBindFramebufferOES()
989 GLEncoder* ctx = (GLEncoder*)self; in s_glFramebufferTexture2DOES() local
990 GLClientState* state = ctx->m_state; in s_glFramebufferTexture2DOES()
994 ctx->m_glFramebufferTexture2DOES_enc(self, target, attachment, textarget, texture, level); in s_glFramebufferTexture2DOES()
1000 GLEncoder* ctx = (GLEncoder*)self; in s_glFramebufferTexture2DMultisampleIMG() local
1001 GLClientState* state = ctx->m_state; in s_glFramebufferTexture2DMultisampleIMG()
1005ctx->m_glFramebufferTexture2DMultisampleIMG_enc(self, target, attachment, textarget, texture, leve… in s_glFramebufferTexture2DMultisampleIMG()
1011 GLEncoder* ctx = (GLEncoder*)self; in s_glGetFramebufferAttachmentParameterivOES() local
1012 const GLClientState* state = ctx->m_state; in s_glGetFramebufferAttachmentParameterivOES()
1020 ctx->m_glGetFramebufferAttachmentParameterivOES_enc(self, target, attachment, pname, params); in s_glGetFramebufferAttachmentParameterivOES()
1106 GLEncoder *ctx = (GLEncoder *)self; in s_glFinish() local
1107 ctx->glFinishRoundTrip(self); in s_glFinish()
1113 GLEncoder *ctx = (GLEncoder*)self; in s_glReadnPixelsEXT() local
1114 SET_ERROR_IF(bufSize < ctx->pixelDataSize(width, height, format, in s_glReadnPixelsEXT()
1116 ctx->glReadPixels(self, x, y, width, height, format, type, pixels); in s_glReadnPixelsEXT()