Пример #1
0
/**
 * Need to delete local programs and programs on servers.
 * XXX \todo this function should probably go elsewhere.
 * \param n
 * \param programs
 */
void TILESORTSPU_APIENTRY
tilesortspu_DeleteProgramsARB(GLsizei n, const GLuint *programs)
{
	GET_THREAD(thread);
	tilesortspuFlush(thread);
	crStateDeleteProgramsARB(n, programs);
	if (tilesort_spu.swap)
		crPackDeleteProgramsARBSWAP(n, programs);
	else
		crPackDeleteProgramsARB(n, programs);
	tilesortspuBroadcastGeom(0);
	tilesortspuShipBuffers();
}
Пример #2
0
void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteProgramsARB(GLsizei n, const GLuint * programs)
{
    GLuint *pLocalProgs = (GLuint *) crAlloc(n * sizeof(GLuint));
    GLint i;
    if (!pLocalProgs) {
        crError("crServerDispatchDeleteProgramsARB: out of memory");
        return;
    }
    for (i = 0; i < n; i++) {
        pLocalProgs[i] = crServerTranslateProgramID(programs[i]);
    }
    crStateDeleteProgramsARB(n, pLocalProgs);
    cr_server.head_spu->dispatch_table.DeleteProgramsARB(n, pLocalProgs);
    crFree(pLocalProgs);
}