VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_stipple.c@ 40708

Last change on this file since 40708 was 33475, checked in by vboxsync, 14 years ago

crOpenGL/wddm: multithreading fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 884 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
12void PACK_APIENTRY crPackPolygonStipple( const GLubyte *mask )
13{
14 CR_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(GLint);
21 else
22 packet_length += 32*32/8;
23
24 CR_GET_BUFFERED_POINTER(pc, packet_length );
25 WRITE_DATA_AI(int, nodata);
26 if (nodata)
27 {
28 WRITE_DATA_AI(GLint, (GLint)(uintptr_t)mask);
29 }
30 else
31 {
32 crMemcpy( data_ptr, mask, 32*32/8 );
33 }
34 WRITE_OPCODE( pc, CR_POLYGONSTIPPLE_OPCODE );
35 CR_UNLOCK_PACKER_CONTEXT(pc);
36}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette