VirtualBox

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

Last change on this file since 27655 was 23694, checked in by vboxsync, 15 years ago

crOpenGL: most changes to extend FBO support to ARB version

  • 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 23694 2009-10-12 13:46:26Z 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
77GLenum PACKSPU_APIENTRY
78packspu_CheckFramebufferStatusEXT(GLenum target)
79{
80 GET_THREAD(thread);
81 int writeback = 1;
82 GLenum status = crStateCheckFramebufferStatusEXT(target);
83
84 if (status!=GL_FRAMEBUFFER_UNDEFINED)
85 {
86 return status;
87 }
88
89 crPackCheckFramebufferStatusEXT(target, &status, &writeback);
90
91 packspuFlush((void *) thread);
92 while (writeback)
93 crNetRecv();
94
95 crStateSetFramebufferStatus(target, status);
96 return status;
97}
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