VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_framebuffer.c@ 68474

Last change on this file since 68474 was 62492, checked in by vboxsync, 8 years ago

(C) 2016

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: pack_framebuffer.c 62492 2016-07-22 18:42:47Z vboxsync $ */
2
3/** @file
4 * VBox OpenGL: EXT_framebuffer_object
5 */
6
7/*
8 * Copyright (C) 2009-2016 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#include "packer.h"
20#include "cr_error.h"
21#include "cr_string.h"
22
23void PACK_APIENTRY
24crPackDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
25{
26 unsigned char *data_ptr;
27 int packet_length = sizeof(GLenum) + sizeof(n) + n*sizeof(*renderbuffers);
28
29 if (!renderbuffers)
30 return;
31
32 data_ptr = (unsigned char *) crPackAlloc(packet_length);
33 WRITE_DATA(0, GLenum, CR_DELETERENDERBUFFERSEXT_EXTEND_OPCODE);
34 WRITE_DATA(4, GLsizei, n);
35 crMemcpy(data_ptr + 8, renderbuffers, n* sizeof(*renderbuffers));
36 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
37 crPackFree(data_ptr);
38}
39
40void PACK_APIENTRY
41crPackDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
42{
43 unsigned char *data_ptr;
44 int packet_length = sizeof(GLenum) + sizeof(n) + n*sizeof(*framebuffers);
45
46 if (!framebuffers)
47 return;
48
49 data_ptr = (unsigned char *) crPackAlloc(packet_length);
50 WRITE_DATA(0, GLenum, CR_DELETEFRAMEBUFFERSEXT_EXTEND_OPCODE);
51 WRITE_DATA(4, GLsizei, n);
52 crMemcpy(data_ptr + 8, framebuffers, n* sizeof(*framebuffers));
53 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
54 crPackFree(data_ptr);
55}
56
57void PACK_APIENTRY
58crPackDeleteRenderbuffersEXTSWAP(GLsizei n, const GLuint * renderbuffers)
59{
60 (void) n;
61 (void) renderbuffers;
62 crError ("No swap version");
63}
64
65void PACK_APIENTRY
66crPackDeleteFramebuffersEXTSWAP(GLsizei n, const GLuint * framebuffers)
67{
68 (void) n;
69 (void) framebuffers;
70 crError ("No swap version");
71}
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