VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_context.c@ 48721

最後變更 在這個檔案從48721是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.3 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 "unpacker.h"
8#include "cr_mem.h"
9
10/* XXX duplicated in pack_context.c */
11#define DISPLAY_NAME_LEN 256
12
13#define READ_BYTES( dest, offset, len ) \
14 crMemcpy( dest, (cr_unpackData + (offset)), len )
15
16void crUnpackExtendCreateContext( void )
17{
18 char dpyName[DISPLAY_NAME_LEN];
19 GLint visBits = READ_DATA( DISPLAY_NAME_LEN + 8, GLint );
20 GLint shareCtx = READ_DATA( DISPLAY_NAME_LEN + 12, GLint );
21 GLint retVal;
22
23 READ_BYTES( dpyName, 8, DISPLAY_NAME_LEN );
24 dpyName[DISPLAY_NAME_LEN - 1] = 0; /* NULL-terminate, just in case */
25
26 SET_RETURN_PTR( DISPLAY_NAME_LEN + 16 );
27 SET_WRITEBACK_PTR( DISPLAY_NAME_LEN + 24 );
28 retVal = cr_unpackDispatch.CreateContext( dpyName, visBits, shareCtx );
29 (void) retVal;
30}
31
32void crUnpackExtendWindowCreate(void)
33{
34 char dpyName[DISPLAY_NAME_LEN];
35 GLint visBits = READ_DATA( DISPLAY_NAME_LEN + 8, GLint );
36 GLint retVal;
37
38 READ_BYTES( dpyName, 8, DISPLAY_NAME_LEN );
39 dpyName[DISPLAY_NAME_LEN - 1] = 0; /* NULL-terminate, just in case */
40
41 SET_RETURN_PTR( DISPLAY_NAME_LEN + 12 );
42 SET_WRITEBACK_PTR( DISPLAY_NAME_LEN + 20 );
43 retVal = cr_unpackDispatch.WindowCreate( dpyName, visBits );
44 (void) retVal;
45}
46
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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