pack_clipplane.c revision e0e0c19eefceaf5d4ec40f9466b58a771f50e799
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* Copyright (c) 2001, Stanford University
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * All rights reserved
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync *
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * See the file LICENSE.txt for information on redistributing this software.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "packer.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "cr_opcodes.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY crPackClipPlane( GLenum plane, const GLdouble *equation )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync GET_PACKER_CONTEXT(pc);
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned char *data_ptr;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync int packet_length = sizeof( plane ) + 4*sizeof(*equation);
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync GET_BUFFERED_POINTER(pc, packet_length );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_DATA( 0, GLenum, plane );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_DOUBLE( 4, equation[0] );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_DOUBLE( 12, equation[1] );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_DOUBLE( 20, equation[2] );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_DOUBLE( 28, equation[3] );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync WRITE_OPCODE( pc, CR_CLIPPLANE_OPCODE );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}