Example #1
0
int
__glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
{
    ClientPtr client = cl->client;
    __GLXcontext *cx;
    int error;
    xGLXSingleReply reply = { 0, };

    __GLX_DECLARE_SWAP_VARIABLES;

    REQUEST_SIZE_MATCH(xGLXSingleReq);

    __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
    cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
    if (!cx) {
        return error;
    }

    /* Do a local glFinish */
    glFinish();

    /* Send empty reply packet to indicate finish is finished */
    __GLX_BEGIN_REPLY(0);
    __GLX_PUT_RETVAL(0);
    __GLX_SWAP_REPLY_HEADER();
    __GLX_SEND_HEADER();

    return Success;
}
Example #2
0
int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc)
{
    __GLXcontext *cx;
    ClientPtr client;
    int error;
    __GLX_DECLARE_SWAP_VARIABLES;

    __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag);
    cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
    if (!cx) {
	return error;
    }

    /* Do a local glFinish */
    CALL_Finish( GET_DISPATCH(), () );
    __GLX_NOTE_FLUSHED_CMDS(cx);

    /* Send empty reply packet to indicate finish is finished */
    client = cl->client;
    __GLX_BEGIN_REPLY(0);
    __GLX_PUT_RETVAL(0);
    __GLX_SWAP_REPLY_HEADER();
    __GLX_SEND_HEADER();

    return Success;
}
Example #3
0
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
{
	GLsizei n;
	GLboolean retval;
	__GLXcontext *cx;
	ClientPtr client = cl->client;
	int error;
	GLboolean answerBuffer[200];
	char *answer;

	cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error);
	if (!cx) {
		return error;
	}
	pc += __GLX_VENDPRIV_HDR_SIZE;
	n = *(GLsizei *)(pc + 0);

	__GLX_GET_ANSWER_BUFFER(answer,cl,n,1);
	retval =
	glAreTexturesResidentEXT( 
		*(GLsizei  *)(pc + 0),
		(GLuint   *)(pc + 4),
		(GLboolean *) answer
	);
	__GLX_PUT_RETVAL(retval);
	__GLX_BEGIN_REPLY(n);
	__GLX_SEND_HEADER();
	__GLX_SEND_BYTE_ARRAY(n);
	return Success;
}
Example #4
0
int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc)
{
	GLenum retval;
	__GLXcontext *cx;
	ClientPtr client = cl->client;
	int error;

	cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
	if (!cx) {
		return error;
	}

	retval =
	glGetError( 
	);
	__GLX_PUT_RETVAL(retval);
	__GLX_BEGIN_REPLY(0);
	__GLX_SEND_HEADER();
	return Success;
}
Example #5
0
int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc)
{
	GLuint retval;
	__GLXcontext *cx;
	ClientPtr client = cl->client;
	int error;

	cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
	if (!cx) {
		return error;
	}
	pc += __GLX_SINGLE_HDR_SIZE;

	retval =
	glGenLists( 
		*(GLsizei  *)(pc + 0)
	);
	__GLX_PUT_RETVAL(retval);
	__GLX_BEGIN_REPLY(0);
	__GLX_SEND_HEADER();
	return Success;
}
Example #6
0
int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
{
	GLboolean retval;
	__GLXcontext *cx;
	ClientPtr client = cl->client;
	int error;

	cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error);
	if (!cx) {
		return error;
	}
	pc += __GLX_VENDPRIV_HDR_SIZE;

	retval =
	glIsTextureEXT( 
		*(GLuint   *)(pc + 0)
	);
	__GLX_PUT_RETVAL(retval);
	__GLX_BEGIN_REPLY(0);
	__GLX_SEND_HEADER();
	return Success;
}