summaryrefslogtreecommitdiffstats
path: root/src/VBox/GuestHost/OpenGL/packer/pack_clipplane.c
blob: 4ad8e040692a9e880bb5503a459a5adf9ca79c8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include "packer.h"
#include "cr_opcodes.h"

void PACK_APIENTRY crPackClipPlane( GLenum plane, const GLdouble *equation )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int packet_length = sizeof( plane ) + 4*sizeof(*equation);
    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DATA( 0, GLenum, plane );
    WRITE_DOUBLE( 4, equation[0] );
    WRITE_DOUBLE( 12, equation[1] );
    WRITE_DOUBLE( 20, equation[2] );
    WRITE_DOUBLE( 28, equation[3] );
    WRITE_OPCODE( pc, CR_CLIPPLANE_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}