VirtualBox

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

最後變更 在這個檔案從72723是 69392,由 vboxsync 提交於 7 年 前

GuestHost/OpenGL: scm updates

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 884 位元組
 
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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