File: FrameBufferObject.h

package info (click to toggle)
colmap 3.5-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 20,564 kB
  • sloc: ansic: 170,595; cpp: 95,339; python: 2,335; makefile: 183; sh: 51
file content (49 lines) | stat: -rwxr-xr-x 1,609 bytes parent folder | download | duplicates (5)
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