Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ACGL
acgl
Commits
bdf1bbd3
Commit
bdf1bbd3
authored
Oct 07, 2015
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added option to re-route default framebuffer to be not 0
parent
70de835d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
include/ACGL/OpenGL/GL.hh
include/ACGL/OpenGL/GL.hh
+6
-0
include/ACGL/OpenGL/Tools.hh
include/ACGL/OpenGL/Tools.hh
+6
-0
src/ACGL/OpenGL/Objects/FrameBufferObject.cc
src/ACGL/OpenGL/Objects/FrameBufferObject.cc
+1
-1
src/ACGL/OpenGL/Tools.cc
src/ACGL/OpenGL/Tools.cc
+12
-0
No files found.
include/ACGL/OpenGL/GL.hh
View file @
bdf1bbd3
...
...
@@ -125,6 +125,12 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#if ACGL_OPENGL_VERSION > 32
// prevents QT from redefining the debug functions
#define GL_ARB_debug_output
#define GL_KHR_debug
#endif
void
CHECKGLERROR
();
#ifdef ACGL_OPENGL_ES
...
...
include/ACGL/OpenGL/Tools.hh
View file @
bdf1bbd3
...
...
@@ -20,6 +20,12 @@
namespace
ACGL
{
namespace
OpenGL
{
//! the set framebuffer will replace framebuffer 0
void
setDefaultFramebuffer
(
GLuint
_id
);
//! can replace glBindFramebuffer( GL_FRAMEBUFFER, 0 ) if the window toolkit needs to use a FB != 0 as the default
void
bindDefaultFramebuffer
();
//! returns the size in bytes of the common gl types named by there GLenums (GL_BYTE, GL_UNSIGNED_INT etc.)
//! returns 0 for unknown types, so be careful ;-)
GLint
getGLTypeSize
(
GLenum
_type
);
...
...
src/ACGL/OpenGL/Objects/FrameBufferObject.cc
View file @
bdf1bbd3
...
...
@@ -293,7 +293,7 @@ SharedTextureData FrameBufferObject::getImageData(GLsizei _width, GLsizei _heigh
size_t
paddingPerRow
=
(
packingAlignment
-
(
bytesOfDataPerRow
%
packingAlignment
)
)
%
packingAlignment
;
GLubyte
*
frameBufferData
=
new
GLubyte
[
_height
*
(
bytesOfDataPerRow
+
paddingPerRow
)
];
glBindFramebuffer
(
GL_FRAMEBUFFER
,
0
);
ACGL
::
OpenGL
::
bindDefaultFramebuffer
(
);
#ifndef ACGL_OPENGLES_VERSION_20
if
(
_readBuffer
!=
GL_INVALID_ENUM
)
...
...
src/ACGL/OpenGL/Tools.cc
View file @
bdf1bbd3
...
...
@@ -15,6 +15,18 @@ using namespace std;
namespace
ACGL
{
namespace
OpenGL
{
GLuint
g_ACGL_defaultFramebuffer
=
0
;
void
setDefaultFramebuffer
(
GLuint
_id
)
{
g_ACGL_defaultFramebuffer
=
_id
;
}
void
bindDefaultFramebuffer
()
{
glBindFramebuffer
(
GL_FRAMEBUFFER
,
g_ACGL_defaultFramebuffer
);
}
#if (ACGL_OPENGL_VERSION >= 30)
bool
doesSupportExtension
(
const
char
*
_extensionName
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment