VirtualBox

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

Last change on this file since 69390 was 69390, checked in by vboxsync, 7 years ago

HostServices/SharedOpenGL: scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.3 KB
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 "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
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