int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) { GLenum pname; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; int error; GLfloat answerBuffer[200]; char *answer; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; pname = *(GLenum *)(pc + 4); compsize = __glGetTexParameterfv_size(pname); if (compsize < 0) compsize = 0; __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); __glXClearErrorOccured(); glGetTexParameterfv( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), (GLfloat *) answer ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_PUT_SIZE(0); __GLX_SEND_HEADER(); } else if (compsize == 1) { __GLX_BEGIN_REPLY(0); __GLX_PUT_SIZE(1); __GLX_PUT_FLOAT(); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize*4); __GLX_PUT_SIZE(compsize); __GLX_SEND_HEADER(); __GLX_SEND_FLOAT_ARRAY(compsize); } return Success; }
GLint __glGetTexParameteriv_size(GLenum pname) { return __glGetTexParameterfv_size(pname); }