VirtualBox

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

Last change on this file since 44529 was 44529, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1/** @file
2 * VBox Packing VisibleRegion information
3 */
4
5/*
6 * Copyright (C) 2008-2012 Oracle Corporation
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
17#include "packer.h"
18#include "cr_opcodes.h"
19#include "cr_error.h"
20
21#ifdef WINDOWS
22#include <windows.h>
23#endif
24
25void PACK_APIENTRY crPackWindowVisibleRegion( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, GLint * pRects )
26{
27 GLint i, size, cnt;
28
29 CR_GET_PACKER_CONTEXT(pc);
30 unsigned char *data_ptr;
31 (void) pc;
32 size = 16 + cRects * 4 * sizeof(GLint);
33 CR_GET_BUFFERED_POINTER( pc, size );
34 WRITE_DATA( 0, GLint, size );
35 WRITE_DATA( 4, GLenum, CR_WINDOWVISIBLEREGION_EXTEND_OPCODE );
36 WRITE_DATA( 8, GLint, window );
37 WRITE_DATA( 12, GLint, cRects );
38
39 cnt = 16;
40 for (i=0; i<cRects; ++i)
41 {
42 WRITE_DATA(cnt, GLint, (GLint) pRects[4*i+0]);
43 WRITE_DATA(cnt+4, GLint, (GLint) pRects[4*i+1]);
44 WRITE_DATA(cnt+8, GLint, (GLint) pRects[4*i+2]);
45 WRITE_DATA(cnt+12, GLint, (GLint) pRects[4*i+3]);
46 cnt += 16;
47 }
48 WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
49 CR_UNLOCK_PACKER_CONTEXT(pc);
50}
51
52void PACK_APIENTRY crPackWindowVisibleRegionSWAP( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, GLint * pRects )
53{
54 crError( "crPackWindowVisibleRegionSWAP unimplemented and shouldn't be called" );
55}
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