Last change
on this file since 27091 was 27091, checked in by vboxsync, 15 years ago |
crOpenGL: add GL_ARB_pixel_buffer_object support
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
|
File size:
845 bytes
|
Line | |
---|
1 | /* Copyright (c) 2001, Stanford University
|
---|
2 | * All rights reserved
|
---|
3 | *
|
---|
4 | * See the file LICENSE.txt for information on redistributing this software.
|
---|
5 | */
|
---|
6 |
|
---|
7 | #include "packer.h"
|
---|
8 | #include "cr_opcodes.h"
|
---|
9 | #include "cr_mem.h"
|
---|
10 | #include "cr_glstate.h"
|
---|
11 |
|
---|
12 | void PACK_APIENTRY crPackPolygonStipple( const GLubyte *mask )
|
---|
13 | {
|
---|
14 | GET_PACKER_CONTEXT(pc);
|
---|
15 | unsigned char *data_ptr;
|
---|
16 | int nodata = crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB);
|
---|
17 | int packet_length = sizeof(int);
|
---|
18 |
|
---|
19 | if (nodata)
|
---|
20 | packet_length += sizeof(uintptr_t);
|
---|
21 | else
|
---|
22 | packet_length += 32*32/8;
|
---|
23 |
|
---|
24 | GET_BUFFERED_POINTER(pc, packet_length );
|
---|
25 | WRITE_DATA_AI(int, nodata);
|
---|
26 | if (nodata)
|
---|
27 | {
|
---|
28 | WRITE_DATA_AI(uintptr_t, (uintptr_t)mask);
|
---|
29 | }
|
---|
30 | else
|
---|
31 | {
|
---|
32 | crMemcpy( data_ptr, mask, 32*32/8 );
|
---|
33 | }
|
---|
34 | WRITE_OPCODE( pc, CR_POLYGONSTIPPLE_OPCODE );
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.