/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "packer.h"
#include "cr_pixeldata.h"
#include "cr_error.h"
#include "cr_string.h"
#include "cr_version.h"
{
unsigned char *data_ptr;
int packet_length;
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( border ) +
sizeof( format ) +
sizeof( type ) +
sizeof( int );
if (pixels)
{
}
if (pixels) {
/* flip application-requested swapBytes state */
}
crPackFree( data_ptr );
}
const CRPixelPackState *unpackstate )
{
unsigned char *data_ptr;
int packet_length;
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( height ) +
sizeof( border ) +
sizeof( format ) +
sizeof( type ) +
sizeof( int );
if (pixels)
{
}
if (pixels)
{
/* flip application-requested swapBytes state */
}
crPackFree( data_ptr );
}
#if defined( GL_EXT_texture3D )
const CRPixelPackState *unpackstate )
{
unsigned char *data_ptr;
int packet_length;
int distrib_buf_len = 0;
int tex_size = 0;
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( height ) +
sizeof( depth ) +
sizeof( border ) +
sizeof( format ) +
sizeof( type ) +
sizeof( int );
if (pixels)
{
if ( is_distrib )
{
}
else
{
}
}
if (pixels)
{
if ( is_distrib )
{
}
else
{
/* flip application-requested swapBytes state */
}
}
crPackFree( data_ptr );
}
#endif /* GL_EXT_texture3D */
#ifdef CR_OPENGL_VERSION_1_2
const CRPixelPackState *unpackstate )
{
unsigned char *data_ptr;
int packet_length;
int distrib_buf_len = 0;
int tex_size = 0;
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( height ) +
sizeof( depth ) +
sizeof( border ) +
sizeof( format ) +
sizeof( type ) +
sizeof( int );
if (pixels)
{
if ( is_distrib )
{
}
else
{
}
}
if (pixels)
{
if ( is_distrib )
{
}
else
{
/* flip application-requested swapBytes state */
}
}
crPackFree( data_ptr );
}
#endif /* CR_OPENGL_VERSION_1_2 */
{
unsigned char *data_ptr;
int i;
int packet_length =
sizeof( n ) +
n*sizeof( *textures );
for ( i = 0 ; i < n ; i++)
{
}
crPackFree( data_ptr );
}
{
unsigned char *data_ptr;
int num_params;
int i;
int packet_length =
sizeof( int ) +
sizeof( target ) +
sizeof( pname );
num_params = 1;
if ( pname == GL_TEXTURE_ENV_COLOR )
{
num_params = 4;
}
for ( i = 0 ; i < num_params ; i++)
{
}
}
{
}
{
/* floats and ints are the same size, so the packing should be the same */
}
{
}
{
}
{
unsigned char *data_ptr;
int packet_length =
sizeof( n ) +
n*sizeof( *textures ) +
n*sizeof( *priorities );
int i;
for ( i = 0 ; i < n ; i++)
{
}
for ( i = 0 ; i < n ; i++)
{
}
crPackFree( data_ptr );
}
{
unsigned char *data_ptr;
int i;
{
num_params = 4;
}
for ( i = 0 ; i < num_params ; i++)
{
}
}
{
}
{
}
{
}
{
}
{
}
{
}
{
unsigned char *data_ptr;
int num_params = 0;
int i;
switch( pname )
{
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
case GL_TEXTURE_WRAP_R:
case GL_TEXTURE_WRAP_S:
case GL_TEXTURE_WRAP_T:
#ifdef GL_TEXTURE_PRIORITY
case GL_TEXTURE_PRIORITY:
#endif
num_params = 1;
break;
num_params = 1;
break;
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
case GL_TEXTURE_BASE_LEVEL:
case GL_TEXTURE_MAX_LEVEL:
num_params = 1;
break;
case GL_TEXTURE_BORDER_COLOR:
num_params = 4;
break;
#ifdef CR_ARB_shadow
num_params = 1;
break;
#endif
#ifdef CR_ARB_shadow_ambient
num_params = 1;
break;
#endif
#ifdef CR_ARB_depth_texture
num_params = 1;
break;
#endif
#ifdef CR_SGIS_generate_mipmap
case GL_GENERATE_MIPMAP_SGIS:
num_params = 1;
break;
#endif
default:
if (!num_params)
{
"crPackTexParameter(bad pname)" );
return GL_FALSE;
}
}
for ( i = 0 ; i < num_params ; i++)
{
}
return GL_TRUE;
}
{
}
{
}
{
}
{
}
#ifdef CR_OPENGL_VERSION_1_2
const CRPixelPackState *unpackstate )
{
unsigned char *data_ptr;
int packet_length;
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( yoffset ) +
sizeof( zoffset ) +
sizeof( width ) +
sizeof( height ) +
sizeof( depth ) +
sizeof( format ) +
sizeof( type ) +
crPackFree( data_ptr );
}
#endif /* CR_OPENGL_VERSION_1_2 */
const CRPixelPackState *unpackstate )
{
unsigned char *data_ptr;
int packet_length;
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( yoffset ) +
sizeof( width ) +
sizeof( height ) +
sizeof( format ) +
sizeof( type ) +
/* flip application-requested swapBytes state */
crPackFree( data_ptr );
}
{
unsigned char *data_ptr;
int packet_length;
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( width ) +
sizeof( format ) +
sizeof( type ) +
/* flip application-requested swapBytes state */
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackAreTexturesResidentSWAP( GLsizei n, const GLuint *textures, GLboolean *residences, GLboolean *return_val, int *writeback )
{
unsigned char *data_ptr;
int packet_length;
int i;
sizeof( int ) + /* packet length */
sizeof( GLenum ) + /* extend-o opcode */
sizeof( n ) + /* num_textures */
n*sizeof( *textures ) + /* textures */
8 + 8 + 8; /* return pointers */
for (i = 0 ; i < n ; i++)
{
}
}
/**********************************************************************
* Texture compression
*/
void PACK_APIENTRY crPackCompressedTexImage1DARBSWAP( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( border ) +
sizeof( imagesize ) +
sizeof( int );
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackCompressedTexImage2DARBSWAP( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( height ) +
sizeof( border ) +
sizeof( imagesize ) +
sizeof( int ); /* isnull */
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackCompressedTexImage3DARBSWAP( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( internalformat ) +
sizeof( width ) +
sizeof( height ) +
sizeof( depth ) +
sizeof( border ) +
sizeof( imagesize ) +
sizeof( int ); /* isnull */
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackCompressedTexSubImage1DARBSWAP( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( width ) +
sizeof( format ) +
sizeof( imagesize ) +
sizeof( int ); /* isnull */
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackCompressedTexSubImage2DARBSWAP( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( yoffset ) +
sizeof( width ) +
sizeof( height ) +
sizeof( format ) +
sizeof( imagesize ) +
sizeof( int ); /* isnull */
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackCompressedTexSubImage3DARBSWAP( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imagesize, const GLvoid *data )
{
unsigned char *data_ptr;
int packet_length;
/* All extended opcodes have their first 8 bytes predefined:
* the first four indicate the packet size, and the next four
* indicate the actual extended opcode.
*/
sizeof( GLenum) + /* extended opcode */
sizeof( target ) +
sizeof( level ) +
sizeof( xoffset ) +
sizeof( yoffset ) +
sizeof( zoffset ) +
sizeof( width ) +
sizeof( height ) +
sizeof( depth ) +
sizeof( format ) +
sizeof( imagesize ) +
sizeof( int ); /* isnull */
if (data)
{
}
if (data) {
}
crPackFree( data_ptr );
}
void PACK_APIENTRY crPackGetCompressedTexImageARBSWAP( GLenum target, GLint level, GLvoid *img, int *writeback )
{
crError ( "GetCompressedTexImageARB needs to be special cased!");
(void) pc;
(void) target;
(void) level;
(void) img;
(void) writeback;
}