VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c@ 21216

Last change on this file since 21216 was 16480, checked in by vboxsync, 16 years ago

crOpenGL: track visible regions on linux guests + some more exports

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1/** @file
2 * VBox Packing VisibleRegion information
3 */
4
5/*
6 * Copyright (C) 2008 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
17 * Clara, CA 95054 USA or visit http://www.sun.com if you need
18 * additional information or have any questions.
19 */
20
21#include "packer.h"
22#include "cr_opcodes.h"
23#include "cr_error.h"
24
25#ifdef WINDOWS
26#include <windows.h>
27#endif
28
29void PACK_APIENTRY crPackWindowVisibleRegion( GLint window, GLint cRects, GLint * pRects )
30{
31 GLint i, size, cnt;
32
33 GET_PACKER_CONTEXT(pc);
34 unsigned char *data_ptr;
35 (void) pc;
36 size = 16 + cRects * 4 * sizeof(GLint);
37 GET_BUFFERED_POINTER( pc, size );
38 WRITE_DATA( 0, GLint, size );
39 WRITE_DATA( 4, GLenum, CR_WINDOWVISIBLEREGION_EXTEND_OPCODE );
40 WRITE_DATA( 8, GLint, window );
41 WRITE_DATA( 12, GLint, cRects );
42
43 cnt = 16;
44 for (i=0; i<cRects; ++i)
45 {
46 WRITE_DATA(cnt, GLint, (GLint) pRects[4*i+0]);
47 WRITE_DATA(cnt+4, GLint, (GLint) pRects[4*i+1]);
48 WRITE_DATA(cnt+8, GLint, (GLint) pRects[4*i+2]);
49 WRITE_DATA(cnt+12, GLint, (GLint) pRects[4*i+3]);
50 cnt += 16;
51 }
52 WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
53}
54
55void PACK_APIENTRY crPackWindowVisibleRegionSWAP( GLint window, GLint cRects, GLint * pRects )
56{
57 crError( "crPackWindowVisibleRegionSWAP unimplemented and shouldn't be called" );
58}
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