VirtualBox

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

Last change on this file since 35263 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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

© 2023 Oracle
ContactPrivacy policyTerms of Use