VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c@ 28733

Last change on this file since 28733 was 28552, checked in by vboxsync, 15 years ago

crOpenGL: add missing renderbuffers tracking on guest side

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: packspu_framebuffer.c 28552 2010-04-21 09:33:25Z vboxsync $ */
2
3/** @file
4 * VBox OpenGL FBO related functions
5 */
6
7/*
8 * Copyright (C) 2009 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#include "packspu.h"
24#include "cr_packfunctions.h"
25#include "cr_net.h"
26#include "packspu_proto.h"
27
28void PACKSPU_APIENTRY
29packspu_FramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
30{
31 crStateFramebufferTexture1DEXT(target, attachment, textarget, texture, level);
32 crPackFramebufferTexture1DEXT(target, attachment, textarget, texture, level);
33}
34
35void PACKSPU_APIENTRY
36packspu_FramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
37{
38 crStateFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
39 crPackFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
40}
41
42void PACKSPU_APIENTRY
43packspu_FramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
44{
45 crStateFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset);
46 crPackFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset);
47}
48
49void PACKSPU_APIENTRY
50packspu_BindFramebufferEXT(GLenum target, GLuint framebuffer)
51{
52 crStateBindFramebufferEXT(target, framebuffer);
53 crPackBindFramebufferEXT(target, framebuffer);
54}
55
56void PACKSPU_APIENTRY
57packspu_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
58{
59 crStateDeleteFramebuffersEXT(n, framebuffers);
60 crPackDeleteFramebuffersEXT(n, framebuffers);
61}
62
63void PACKSPU_APIENTRY
64packspu_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
65{
66 crStateDeleteFramebuffersEXT(n, renderbuffers);
67 crPackDeleteFramebuffersEXT(n, renderbuffers);
68}
69
70void PACKSPU_APIENTRY
71packspu_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
72{
73 crStateFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
74 crPackFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
75}
76
77void PACKSPU_APIENTRY
78packspu_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
79{
80 crStateBindRenderbufferEXT(target, renderbuffer);
81 crPackBindRenderbufferEXT(target, renderbuffer);
82}
83
84GLenum PACKSPU_APIENTRY
85packspu_CheckFramebufferStatusEXT(GLenum target)
86{
87 GET_THREAD(thread);
88 int writeback = 1;
89 GLenum status = crStateCheckFramebufferStatusEXT(target);
90
91 if (status!=GL_FRAMEBUFFER_UNDEFINED)
92 {
93 return status;
94 }
95
96 crPackCheckFramebufferStatusEXT(target, &status, &writeback);
97
98 packspuFlush((void *) thread);
99 while (writeback)
100 crNetRecv();
101
102 crStateSetFramebufferStatus(target, status);
103 return status;
104}
Note: See TracBrowser for help on using the repository browser.

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