server_lists.c revision f3e7d9f629952c2a40ea9788ba1d9b748131e26b
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/* Copyright (c) 2001-2003, Stanford University
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync All rights reserved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync See the file LICENSE.txt for information on redistributing this software. */
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Notes on ID translation:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * If a server has multiple clients (in the case of parallel applications)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * and N of the clients all create a display list with ID K, does K name
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * one display list or N different display lists?
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * By default, there is one display list named K. If the clients put
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * identical commands into list K, then this is fine. But if the clients
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * each put something different into list K when they created it, then this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * is a serious problem.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * By zeroing the 'shared_display_lists' configuration option, we can tell
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * the server to make list K be unique for all N clients. We do this by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * translating K into a new, unique ID dependent on which client we're
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * talking to (curClient->number).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Same story for texture objects, vertex programs, etc.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * The application can also dynamically switch between shared and private
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * display lists with:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * glChromiumParameteri(GL_SHARED_DISPLAY_LISTS_CR, GL_TRUE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * glChromiumParameteri(GL_SHARED_DISPLAY_LISTS_CR, GL_FALSE)
return id;
return id;
static void crServerQueryHWState()
#ifndef IN_GUEST
GLsizei i;
switch (type) {
case GL_UNSIGNED_BYTE:
case GL_BYTE:
case GL_UNSIGNED_SHORT:
case GL_SHORT:
case GL_UNSIGNED_INT:
case GL_INT:
case GL_FLOAT:
case GL_2_BYTES:
case GL_3_BYTES:
case GL_4_BYTES:
if (newLists) {
return retval;
GLint i;
if (!pLocalProgs) {
GLsizei i;
(void) residences;