Main Page
Guides
Downloads
Documentation
Contact
File List
All
Data Structures
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Pages
DynacoeSrc
includes
Dynacoe
Backends
Framebuffer
OpenGLFB
GLRenderTarget_Legacy.h
1
/*
2
3
Copyright (c) 2018, Johnathan Corkery. (jcorkery@umich.edu)
4
All rights reserved.
5
6
This file is part of the Dynacoe project (https://github.com/jcorks/Dynacoe)
7
Dynacoe was released under the MIT License, as detailed below.
8
9
10
11
Permission is hereby granted, free of charge, to any person obtaining a copy
12
of this software and associated documentation files (the "Software"), to deal
13
in the Software without restriction, including without limitation the rights
14
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
copies of the Software, and to permit persons to whom the Software is furnished
16
to do so, subject to the following conditions:
17
18
The above copyright notice and this permission notice shall
19
be included in all copies or substantial portions of the Software.
20
21
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27
DEALINGS IN THE SOFTWARE.
28
29
30
31
*/
32
33
#ifndef H_DC_GL_RENDER_TARGET_LEGACY_INCLUDED
34
#define H_DC_GL_RENDER_TARGET_LEGACY_INCLUDED
35
36
37
#include "GLRenderTarget.h"
38
39
40
namespace
Dynacoe
{
41
class
GLRenderTarget_Legacy :
public
GLRenderTarget {
42
public
:
43
GLRenderTarget_Legacy();
44
~GLRenderTarget_Legacy();
45
46
// Resizes the render target
47
void
Resize(
int
,
int
);
48
49
// Returns the texture handle representing the contents of the drawn resutls
50
GLuint GetTexture();
51
52
// Assures that rendering results are drawn to this framebuffer
53
// and its contents are written to the texture object
54
void
DrawTo();
55
56
// After this call, all pending results are guaranteed to be
57
// written to the textures
58
void
Sync();
59
60
// Marks the GLRenderTarget as dirty so that Sync() calls will
61
// force an update.
62
void
Invalidate();
63
64
// equivalent to Framebuffer.h's equivalent function
65
void
GetRawData(uint8_t *);
66
67
// enable/disable bilinear filtering on the texture
68
void
SetFiltering(
bool
);
69
70
private
:
71
GLuint colorTex;
72
GLuint depthTex;
73
bool
dirty;
74
int
w;
int
h;
75
};
76
}
77
78
79
80
#endif
Dynacoe
Definition:
AssetID.h:37
Generated by
1.8.8