server_gentextures.c revision e0e0c19eefceaf5d4ec40f9466b58a771f50e799
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "cr_spu.h"
#include "chromium.h"
#include "cr_mem.h"
#include "cr_net.h"
#include "server_dispatch.h"
#include "server.h"
{
GLsizei i;
(void) textures;
/* This is somewhat hacky.
* We have to make sure we're going to generate unique texture IDs.
* That wasn't the case before snapshot loading, because we could just rely on host video drivers.
* Now we could have a set of loaded texture IDs which aren't already reserved in the host driver.
* with n==number of loaded textures. But it's really implementation dependant. So can't rely that it'll not change.
*/
for (i=0; i<n; ++i)
{
/* translate the ID as it'd be done in glBindTexture call */
/* check if we have a texture with same ID loaded from snapshot */
while (crStateIsTexture(tID))
{
/* request new ID */
local_textures[i] = tID;
}
}
crFree( local_textures );
}
{
(void) ids;
crFree( local_progs );
}
{
(void) ids;
crFree( local_fences );
}
{
GLsizei i;
(void) ids;
/* see comments in crServerDispatchGenTextures */
for (i=0; i<n; ++i)
{
while (crStateIsProgramARB(tID))
{
local_progs[i] = tID;
}
}
crFree( local_progs );
}