pack_shaders.c revision 8a5e0b7c43d7ee861689984edc2abd86b9ed4456
/* $Id$ */
/** @file
* VBox OpenGL DRI driver functions
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* Sun Microsystems, Inc. confidential
* All rights reserved
*/
#include "packer.h"
#include "cr_error.h"
#include "cr_string.h"
#ifdef CR_OPENGL_VERSION_2_0
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
void PACK_APIENTRY crPackShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length)
{
unsigned char *data_ptr;
int packet_length = sizeof(int)+sizeof(shader)+sizeof(count)+sizeof(GLint)+count*sizeof(*pLocalLength);
GLsizei i;
if (!pLocalLength) return;
for (i=0; i<count; ++i)
{
packet_length += pLocalLength[i];
}
if (length)
{
}
WRITE_DATA(0, int, packet_length);
data_ptr += sizeof(int);
if (length)
{
}
for (i=0; i<count; ++i)
{
data_ptr += pLocalLength[i];
}
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
{
unsigned char *data_ptr;
WRITE_DATA(0, int, packet_length);
}
void PACK_APIENTRY crPackUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
unsigned char *data_ptr;
int packet_length = sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose) + 2*2*count*sizeof(*value);
WRITE_DATA(0, int, packet_length);
crMemcpy(data_ptr + sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose), value, 2*2*count*sizeof(*value));
}
void PACK_APIENTRY crPackUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
unsigned char *data_ptr;
int packet_length = sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose) + 3*3*count*sizeof(*value);
WRITE_DATA(0, int, packet_length);
crMemcpy(data_ptr + sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose), value, 3*3*count*sizeof(*value));
}
void PACK_APIENTRY crPackUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
unsigned char *data_ptr;
int packet_length = sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose) + 4*4*count*sizeof(*value);
WRITE_DATA(0, int, packet_length);
crMemcpy(data_ptr + sizeof(int)+sizeof(location)+sizeof(count)+sizeof(transpose), value, 4*4*count*sizeof(*value));
}
{
(void)program;
(void)index;
(void)name;
crError ("No swap version");
(void) pc;
}
void PACK_APIENTRY crPackShaderSourceSWAP(GLuint shader, GLsizei count, const char **string, const GLint *length)
{
(void)shader;
(void)count;
(void)string;
(void)length;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
{
(void)location;
(void)count;
(void)value;
crError ("No swap version");
(void) pc;
}
void PACK_APIENTRY crPackUniformMatrix2fvSWAP(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
(void)location;
(void)count;
(void)transpose;
(void)value;
crError ("No swap version");
(void) pc;
}
void PACK_APIENTRY crPackUniformMatrix3fvSWAP(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
(void)location;
(void)count;
(void)transpose;
(void)value;
crError ("No swap version");
(void) pc;
}
void PACK_APIENTRY crPackUniformMatrix4fvSWAP(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
(void)location;
(void)count;
(void)transpose;
(void)value;
crError ("No swap version");
(void) pc;
}
#endif /* #ifdef CR_OPENGL_VERSION_2_0 */