VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_fence.c@ 40640

最後變更 在這個檔案從40640是 33457,由 vboxsync 提交於 14 年 前

crOpenGL: tabs to spaces

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.2 KB
 
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
9void PACK_APIENTRY
10crPackDeleteFencesNV(GLsizei n, const GLuint * fences)
11{
12 unsigned char *data_ptr;
13 int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*fences);
14
15 if( !fences )
16 return;
17
18 data_ptr = (unsigned char *) crPackAlloc(packet_length);
19 WRITE_DATA(0, GLenum, CR_DELETEFENCESNV_EXTEND_OPCODE);
20 WRITE_DATA(4, GLsizei, n);
21 crMemcpy(data_ptr + 8, fences, n * sizeof(*fences));
22 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
23 crPackFree(data_ptr);
24}
25
26void PACK_APIENTRY crPackDeleteFencesNVSWAP( GLsizei n, const GLuint *fences )
27{
28 unsigned char *data_ptr;
29 int i;
30 int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*fences);
31
32 if( !fences )
33 return;
34
35 data_ptr = (unsigned char *) crPackAlloc( packet_length );
36 WRITE_DATA(0, GLenum, CR_DELETEFENCESNV_EXTEND_OPCODE);
37 WRITE_DATA(4, GLsizei, n);
38 for (i = 0 ; i < n ; i++)
39 {
40 WRITE_DATA(i*sizeof(GLuint) + 8, GLuint, SWAP32(fences[i]));
41 }
42 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
43 crPackFree(data_ptr);
44}
45
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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