Example #1
0
void
__glXDispSwap_Map2d(GLbyte * pc)
{
    GLdouble u1, u2, v1, v2, *points;
    GLint uorder, vorder, ustride, vstride, k, compsize;
    GLenum target;

    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;

    __GLX_SWAP_DOUBLE(pc + 0);
    __GLX_SWAP_DOUBLE(pc + 8);
    __GLX_SWAP_DOUBLE(pc + 16);
    __GLX_SWAP_DOUBLE(pc + 24);
    __GLX_SWAP_INT(pc + 32);
    __GLX_SWAP_INT(pc + 36);
    __GLX_SWAP_INT(pc + 40);

    target = *(GLenum *) (pc + 32);
    uorder = *(GLint *) (pc + 36);
    vorder = *(GLint *) (pc + 40);
    k = __glMap2d_size(target);
    if (vorder <= 0 || uorder <= 0 || k < 0) {
        /* Erroneous command. */
        compsize = 0;
    }
    else {
        compsize = uorder * vorder * k;
    }
    __GLX_GET_DOUBLE(u1, pc);
    __GLX_GET_DOUBLE(u2, pc + 8);
    __GLX_GET_DOUBLE(v1, pc + 16);
    __GLX_GET_DOUBLE(v2, pc + 24);
    __GLX_SWAP_DOUBLE_ARRAY(pc + 44, compsize);
    pc += 44;
    ustride = vorder * k;
    vstride = k;

#ifdef __GLX_ALIGN64
    if (((unsigned long) pc) & 7) {
        /*
         ** Copy the doubles up 4 bytes, trashing the command but aligning
         ** the data in the process
         */
        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
        points = (GLdouble *) (pc - 4);
    }
    else {
        points = (GLdouble *) pc;
    }
#else
    points = (GLdouble *) pc;
#endif
    CALL_Map2d(GET_DISPATCH(),
               (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder,
                points));
}
Example #2
0
File: g_render.c Project: aosm/X11
void __glXDisp_Vertex4dv(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 32);
	    pc -= 4;
	}
#endif
	glVertex4dv( 
		(GLdouble *)(pc + 0)
	);
}
Example #3
0
File: g_render.c Project: aosm/X11
void __glXDisp_ClearDepth(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 8);
	    pc -= 4;
	}
#endif
	glClearDepth( 
		*(GLclampd *)(pc + 0)
	);
}
Example #4
0
File: g_render.c Project: aosm/X11
void __glXDisp_TexCoord3dv(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 24);
	    pc -= 4;
	}
#endif
	glTexCoord3dv( 
		(GLdouble *)(pc + 0)
	);
}
Example #5
0
File: g_render.c Project: aosm/X11
void __glXDisp_MultMatrixd(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 128);
	    pc -= 4;
	}
#endif
	glMultMatrixd( 
		(GLdouble *)(pc + 0)
	);
}
Example #6
0
File: g_render.c Project: aosm/X11
void __glXDisp_RasterPos2dv(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 16);
	    pc -= 4;
	}
#endif
	glRasterPos2dv( 
		(GLdouble *)(pc + 0)
	);
}
Example #7
0
void
__glXDisp_Map2d(GLbyte * pc)
{
    GLdouble u1, u2, v1, v2, *points;
    GLint uorder, vorder, ustride, vstride, k;

#ifdef __GLX_ALIGN64
    GLint compsize;
#endif
    GLenum target;

    target = *(GLenum *) (pc + 32);
    uorder = *(GLint *) (pc + 36);
    vorder = *(GLint *) (pc + 40);
    k = __glMap2d_size(target);

#ifdef __GLX_ALIGN64
    if (vorder < 0 || uorder < 0 || k < 0) {
        compsize = 0;
    }
    else {
        compsize = uorder * vorder * k;
    }
#endif

    __GLX_GET_DOUBLE(u1, pc);
    __GLX_GET_DOUBLE(u2, pc + 8);
    __GLX_GET_DOUBLE(v1, pc + 16);
    __GLX_GET_DOUBLE(v2, pc + 24);
    pc += 44;

    ustride = vorder * k;
    vstride = k;

#ifdef __GLX_ALIGN64
    if (((unsigned long) pc) & 7) {
        /*
         ** Copy the doubles up 4 bytes, trashing the command but aligning
         ** the data in the process
         */
        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
        points = (GLdouble *) (pc - 4);
    }
    else {
        points = (GLdouble *) pc;
    }
#else
    points = (GLdouble *) pc;
#endif
    glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
}
Example #8
0
void __glXDispSwap_ClearDepth(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 8);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_DOUBLE(pc + 0);

}
Example #9
0
void __glXDispSwap_Color4dv(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;
	__GLX_DECLARE_SWAP_ARRAY_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 32);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
Example #10
0
File: g_render.c Project: aosm/X11
void __glXDisp_MultiTexCoord4dvARB(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 36);
	    pc -= 4;
	}
#endif
	glMultiTexCoord4dvARB( 
		*(GLenum   *)(pc + 32),
		(GLdouble *)(pc + 0)
	);
}
Example #11
0
File: g_render.c Project: aosm/X11
void __glXDisp_DepthRange(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 16);
	    pc -= 4;
	}
#endif
	glDepthRange( 
		*(GLclampd *)(pc + 0),
		*(GLclampd *)(pc + 8)
	);
}
Example #12
0
File: g_render.c Project: aosm/X11
void __glXDisp_ClipPlane(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 36);
	    pc -= 4;
	}
#endif
	glClipPlane( 
		*(GLenum   *)(pc + 32),
		(GLdouble *)(pc + 0)
	);
}
Example #13
0
File: g_render.c Project: aosm/X11
void __glXDisp_TexGend(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 16);
	    pc -= 4;
	}
#endif
	glTexGend( 
		*(GLenum   *)(pc + 8),
		*(GLenum   *)(pc + 12),
		*(GLdouble *)(pc + 0)
	);
}
Example #14
0
File: g_render.c Project: aosm/X11
void __glXDisp_Translated(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 24);
	    pc -= 4;
	}
#endif
	glTranslated( 
		*(GLdouble *)(pc + 0),
		*(GLdouble *)(pc + 8),
		*(GLdouble *)(pc + 16)
	);
}
Example #15
0
File: g_render.c Project: aosm/X11
void __glXDisp_MapGrid1d(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 20);
	    pc -= 4;
	}
#endif
	glMapGrid1d( 
		*(GLint    *)(pc + 16),
		*(GLdouble *)(pc + 0),
		*(GLdouble *)(pc + 8)
	);
}
Example #16
0
void __glXDispSwap_MultMatrixd(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;
	__GLX_DECLARE_SWAP_ARRAY_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 128);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);

}
Example #17
0
void __glXDispSwap_Translated(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 24);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_DOUBLE(pc + 0);
	__GLX_SWAP_DOUBLE(pc + 8);
	__GLX_SWAP_DOUBLE(pc + 16);

}
Example #18
0
void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;
	__GLX_DECLARE_SWAP_ARRAY_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 36);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_INT(pc + 32);
	__GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);

}
Example #19
0
void
__glXDispSwap_Map1d(GLbyte * pc)
{
    GLint order, k, compsize;
    GLenum target;
    GLdouble u1, u2, *points;

    __GLX_DECLARE_SWAP_VARIABLES;
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;

    __GLX_SWAP_DOUBLE(pc + 0);
    __GLX_SWAP_DOUBLE(pc + 8);
    __GLX_SWAP_INT(pc + 16);
    __GLX_SWAP_INT(pc + 20);

    target = *(GLenum *) (pc + 16);
    order = *(GLint *) (pc + 20);
    k = __glMap1d_size(target);
    if (order <= 0 || k < 0) {
        /* Erroneous command. */
        compsize = 0;
    }
    else {
        compsize = order * k;
    }
    __GLX_GET_DOUBLE(u1, pc);
    __GLX_GET_DOUBLE(u2, pc + 8);
    __GLX_SWAP_DOUBLE_ARRAY(pc + 24, compsize);
    pc += 24;

#ifdef __GLX_ALIGN64
    if (((unsigned long) pc) & 7) {
        /*
         ** Copy the doubles up 4 bytes, trashing the command but aligning
         ** the data in the process
         */
        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
        points = (GLdouble *) (pc - 4);
    }
    else {
        points = (GLdouble *) pc;
    }
#else
    points = (GLdouble *) pc;
#endif
    glMap1d(target, u1, u2, k, order, points);
}
Example #20
0
void
__glXDisp_Map1d(GLbyte * pc)
{
    GLint order, k;

#ifdef __GLX_ALIGN64
    GLint compsize;
#endif
    GLenum target;
    GLdouble u1, u2, *points;

    target = *(GLenum *) (pc + 16);
    order = *(GLint *) (pc + 20);
    k = __glMap1d_size(target);

#ifdef __GLX_ALIGN64
    if (order < 0 || k < 0) {
        compsize = 0;
    }
    else {
        compsize = order * k;
    }
#endif

    __GLX_GET_DOUBLE(u1, pc);
    __GLX_GET_DOUBLE(u2, pc + 8);
    pc += 24;

#ifdef __GLX_ALIGN64
    if (((unsigned long) pc) & 7) {
        /*
         ** Copy the doubles up 4 bytes, trashing the command but aligning
         ** the data in the process
         */
        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
        points = (GLdouble *) (pc - 4);
    }
    else {
        points = (GLdouble *) pc;
    }
#else
    points = (GLdouble *) pc;
#endif
    glMap1d(target, u1, u2, k, order, points);
}
Example #21
0
File: g_render.c Project: aosm/X11
void __glXDisp_Ortho(GLbyte *pc)
{

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 48);
	    pc -= 4;
	}
#endif
	glOrtho( 
		*(GLdouble *)(pc + 0),
		*(GLdouble *)(pc + 8),
		*(GLdouble *)(pc + 16),
		*(GLdouble *)(pc + 24),
		*(GLdouble *)(pc + 32),
		*(GLdouble *)(pc + 40)
	);
}
Example #22
0
void __glXDispSwap_MapGrid2d(GLbyte *pc)
{
	__GLX_DECLARE_SWAP_VARIABLES;


#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, 40);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_INT(pc + 32);
	__GLX_SWAP_DOUBLE(pc + 0);
	__GLX_SWAP_DOUBLE(pc + 8);
	__GLX_SWAP_INT(pc + 36);
	__GLX_SWAP_DOUBLE(pc + 16);
	__GLX_SWAP_DOUBLE(pc + 24);

}
Example #23
0
File: g_render.c Project: aosm/X11
void __glXDisp_TexGendv(GLbyte *pc)
{
#ifdef __GLX_ALIGN64
	GLenum pname;
	GLint cmdlen;
	GLint compsize;

	pname = *(GLenum *)(pc + 4);
	compsize = __glTexGendv_size(pname);
	if (compsize < 0) compsize = 0;
	cmdlen = __GLX_PAD(8+compsize*8);
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, cmdlen);
	    pc -= 4;
	}
#endif

	glTexGendv( 
		*(GLenum   *)(pc + 0),
		*(GLenum   *)(pc + 4),
		(GLdouble *)(pc + 8)
	);
}
Example #24
0
void __glXDispSwap_TexGendv(GLbyte *pc)
{
	GLenum pname;
	GLint cmdlen;
	GLint compsize;
	__GLX_DECLARE_SWAP_VARIABLES;
	__GLX_DECLARE_SWAP_ARRAY_VARIABLES;

	__GLX_SWAP_INT(pc + 4);
	pname = *(GLenum *)(pc + 4);
	compsize = __glTexGendv_size(pname);
	if (compsize < 0) compsize = 0;
	cmdlen = __GLX_PAD(8+compsize*8);

#ifdef __GLX_ALIGN64
	if ((unsigned long)(pc) & 7) {
	    __GLX_MEM_COPY(pc-4, pc, cmdlen);
	    pc -= 4;
	}
#endif
	__GLX_SWAP_INT(pc + 0);
	__GLX_SWAP_DOUBLE_ARRAY(pc + 8, compsize);

}