void __indirect_glRectsv(const GLshort *v1, const GLshort *v2)
{
	__GLX_DECLARE_VARIABLES();
	__GLX_LOAD_VARIABLES();
	__GLX_BEGIN(X_GLrop_Rectsv,12);
	__GLX_PUT_SHORT(4,v1[0]);
	__GLX_PUT_SHORT(6,v1[1]);
	__GLX_PUT_SHORT(8,v2[0]);
	__GLX_PUT_SHORT(10,v2[1]);
	__GLX_END(12);
}
void __indirect_glLineStipple(GLint factor, GLushort pattern)
{
	__GLX_DECLARE_VARIABLES();
	__GLX_LOAD_VARIABLES();
	__GLX_BEGIN(X_GLrop_LineStipple,12);
	__GLX_PUT_LONG(4,factor);
	__GLX_PUT_SHORT(8,pattern);
	__GLX_END(12);
}
Exemple #3
0
int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
{
	GLenum map;
	GLint compsize;
	__GLXcontext *cx;
	ClientPtr client = cl->client;
	int error;
	GLushort answerBuffer[200];
	char *answer;

	cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
	if (!cx) {
		return error;
	}
	pc += __GLX_SINGLE_HDR_SIZE;
	map = *(GLenum *)(pc + 0);
	compsize = __glGetPixelMapusv_size(map);
	if (compsize < 0) compsize = 0;

	__GLX_GET_ANSWER_BUFFER(answer,cl,compsize*2,2);
	__glXClearErrorOccured();
	glGetPixelMapusv( 
		*(GLenum   *)(pc + 0),
		(GLushort *) 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_SHORT();
	    __GLX_SEND_HEADER();
	} else {
	    __GLX_BEGIN_REPLY(compsize*2);
	    __GLX_PUT_SIZE(compsize);
	    __GLX_SEND_HEADER();
	    __GLX_SEND_SHORT_ARRAY(compsize);
	}
	return Success;
}