packspu_client.c revision 7c14a9ed66f00f1a0ed175796436ea7730db2ef3
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "packspu.h"
#include "cr_packfunctions.h"
#include "cr_glstate.h"
#include "packspu_proto.h"
void PACKSPU_APIENTRY packspu_FogCoordPointerEXT( GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_ColorPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_SecondaryColorPointerEXT( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_VertexPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_TexCoordPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
{
else
}
#endif
}
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_VertexAttribPointerARB( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
void PACKSPU_APIENTRY packspu_VertexAttribPointerNV( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
}
{
else
}
#endif
}
{
}
void PACKSPU_APIENTRY packspu_InterleavedArrays( GLenum format, GLsizei stride, const GLvoid *pointer )
{
else
}
#endif
/*crDebug("packspu_InterleavedArrays");*/
}
void PACKSPU_APIENTRY
{
/*@todo cash guest/host pointers calculation and use appropriate path here without crStateUseServerArrays call*/
#if 1
/*crDebug("packspu_ArrayElement index:%i", index);*/
#endif
if (serverArrays) {
* produces unpredictable results. Locking is done before the glBegin call instead.
*/
/* Send the DrawArrays command over the wire */
else
}
else {
/* evaluate locally */
else
}
#else
#endif
}
/*#define CR_USE_LOCKARRAYS*/
void PACKSPU_APIENTRY
{
/*crDebug("DrawElements count=%d, indices=%p", count, indices);*/
# ifdef CR_USE_LOCKARRAYS
{
GLsizei i;
switch (type)
{
case GL_UNSIGNED_BYTE:
{
for (i=0; i<count; ++i)
{
}
break;
}
case GL_UNSIGNED_SHORT:
{
for (i=0; i<count; ++i)
{
}
break;
}
case GL_UNSIGNED_INT:
{
for (i=0; i<count; ++i)
{
}
break;
}
}
{
if (serverArrays)
{
}
else
{
}
}
}
# endif
#endif
if (serverArrays) {
/*Note the comment in packspu_LockArraysEXT*/
{
}
/* Send the DrawArrays command over the wire */
else
}
else {
/* evaluate locally */
else
{
//packspu_Begin(mode);
//packspu_End();
}
}
if (lockedArrays)
{
}
#endif
}
void PACKSPU_APIENTRY
packspu_DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices )
{
/*crDebug("DrawRangeElements count=%d", count);*/
#endif
if (serverArrays) {
/*Note the comment in packspu_LockArraysEXT*/
{
}
/* Send the DrawRangeElements command over the wire */
else
}
else {
/* evaluate locally */
else
{
}
}
}
void PACKSPU_APIENTRY
{
/*crDebug("DrawArrays count=%d", count);*/
# ifdef CR_USE_LOCKARRAYS
{
if (serverArrays)
{
}
else
{
}
}
# endif
#endif
if (serverArrays)
{
/*Note the comment in packspu_LockArraysEXT*/
{
}
/* Send the DrawArrays command over the wire */
else
}
else
{
/* evaluate locally */
else
}
if (lockedArrays)
{
}
#endif
}
#ifdef CR_EXT_multi_draw_arrays
void PACKSPU_APIENTRY packspu_MultiDrawArraysEXT( GLenum mode, GLint *first, GLsizei *count, GLsizei primcount )
{
GLint i;
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
}
}
}
void PACKSPU_APIENTRY packspu_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount )
{
GLint i;
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
}
}
}
#endif
{
}
{
}
{
}
{
}
{
}
{
if (cap!=GL_LIGHT_MODEL_TWO_SIDE)
{
else
}
else
{
static int g_glmts1_warn=0;
if (!g_glmts1_warn)
{
crWarning("glEnable(GL_LIGHT_MODEL_TWO_SIDE) converted to valid glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,1)");
}
}
}
{
if (cap!=GL_LIGHT_MODEL_TWO_SIDE)
{
else
}
else
{
static int g_glmts0_warn=0;
if (!g_glmts0_warn)
{
crWarning("glDisable(GL_LIGHT_MODEL_TWO_SIDE) converted to valid glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,0)");
}
}
}
{
#ifdef DEBUG
{
int writeback = 1;
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
#endif
return res;
}
{
}
void PACKSPU_APIENTRY packspu_PopClientAttrib( void )
{
}
{
{
/*Note: this is a workaround for quake3 based apps.
It's modifying vertex data between glLockArraysEXT and glDrawElements calls,
so we'd pass data to host right before the glDrawSomething or glBegin call.
*/
/*crPackLockArraysEXT(first, count);*/
}
}
{
{
}
}