server_getteximage.c revision 88c504b1c053e580e42d5fc90ef2ccedc50c65bd
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/* Copyright (c) 2001, Stanford University
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * All rights reserved
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * See the file LICENSE.txt for information on redistributing this software.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsynccrServerDispatchGetTexImage(GLenum target, GLint level, GLenum format,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync if (crStateIsBufferBound(GL_PIXEL_PACK_BUFFER_ARB))
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /*pixels are actualy a pointer to location of 8byte network pointer in hgcm buffer
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync regarless of guest/host bitness we're using only 4lower bytes as there're no
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync pbo>4gb (yet?)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync pbo_offset = (GLvoid*) ((uintptr_t) *((GLint*)pixels));
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync cr_server.head_spu->dispatch_table.GetTexImage(target, level, format, type, pbo_offset);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync size = crTextureSize(format, type, width, height, depth);
#ifdef CR_ARB_pixel_buffer_object
cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &size);
#ifdef CR_ARB_pixel_buffer_object