-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrameBufferObject.h
More file actions
49 lines (44 loc) · 1.57 KB
/
FrameBufferObject.h
File metadata and controls
49 lines (44 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
////////////////////////////////////////////////////////////////////////////
// File: FrameBufferObject.h
// Author: Changchang Wu
// Description : interface for the FrameBufferObject class.
//
//
//
// Copyright (c) 2007 University of North Carolina at Chapel Hill
// All Rights Reserved
//
// Permission to use, copy, modify and distribute this software and its
// documentation for educational, research and non-profit purposes, without
// fee, and without a written agreement is hereby granted, provided that the
// above copyright notice and the following paragraph appear in all copies.
//
// The University of North Carolina at Chapel Hill make no representations
// about the suitability of this software for any purpose. It is provided
// 'as is' without express or implied warranty.
//
// Please send BUG REPORTS to ccwu@cs.unc.edu
//
////////////////////////////////////////////////////////////////////////////
#if !defined(_FRAME_BUFFER_OBJECT_H)
#define _FRAME_BUFFER_OBJECT_H
class FrameBufferObject
{
static GLuint GlobalFBO; //not thread-safe
GLuint _fboID;
public:
static int UseSingleFBO;
public:
static void DeleteGlobalFBO();
static void UnattachTex(GLenum attachment);
static void UnbindFBO();
static void AttachDepthTexture(GLenum textureTarget, GLuint texID);
static void AttachTexture( GLenum textureTarget, GLenum attachment, GLuint texID);
static void AttachRenderBuffer(GLenum attachment, GLuint buffID );
static void UnattachRenderBuffer(GLenum attachment);
public:
void BindFBO();
FrameBufferObject(int autobind = 1);
~FrameBufferObject();
};
#endif