Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
acgl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACGL
acgl
Commits
bd934fce
Commit
bd934fce
authored
Feb 14, 2012
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readded warning supression from GLM, cleanups
parent
708174d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
28 deletions
+57
-28
include/ACGL/Math/Math.hh
include/ACGL/Math/Math.hh
+46
-7
include/ACGL/OpenGL/Objects/Buffer.hh
include/ACGL/OpenGL/Objects/Buffer.hh
+10
-10
include/ACGL/OpenGL/Objects/ShaderProgram.hh
include/ACGL/OpenGL/Objects/ShaderProgram.hh
+1
-1
src/ACGL/OpenGL/Controller/ShaderProgramControlFiles.cc
src/ACGL/OpenGL/Controller/ShaderProgramControlFiles.cc
+0
-10
No files found.
include/ACGL/Math/Math.hh
View file @
bd934fce
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011,
Computer Graphics Group RWTH Aachen University
//
// Copyright (c) 2011,
2012 Computer Graphics Group RWTH Aachen University
//
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -18,20 +18,59 @@
* this, you should never include glm yourself, but include always our ACGL/Math.hh!
*/
/////////////////////////////////////////////////////////////////////////////////////
// ignore compiler warnings from GLM:
//
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning ( disable : 4201 )
#pragma warning ( disable : 4100 )
#pragma warning ( disable : 4996 )
#pragma warning ( disable : 4244 )
#pragma warning( push )
#pragma warning ( disable : 4201 )
#pragma warning ( disable : 4100 )
#pragma warning ( disable : 4996 )
#pragma warning ( disable : 4244 )
#endif
#if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4))
#define COMPILER_IS_GCC_4_6_OR_NEWER
#endif
#ifdef __clang__
// clang/llvm:
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wuninitialized"
# pragma clang diagnostic ignored "-Wunused-parameter"
#elif defined __GNUC__
# ifdef COMPILER_IS_GCC_4_6_OR_NEWER
// gcc >= 4.6:
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wtype-limits"
# endif
// gcc:
# pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//
/////////////////////////////////////////////////////////////////////////////////////
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#ifdef _MSC_VER
/////////////////////////////////////////////////////////////////////////////////////
// reactivate compiler warnings:
//
#ifdef __clang__
// clang/llvm:
# pragma clang diagnostic pop
#elif defined COMPILER_IS_GCC_4_6_OR_NEWER
// gcc >= 4.6:
# pragma GCC diagnostic pop
#endif
#ifdef _MSC_VER
#pragma warning( pop )
#endif
//
/////////////////////////////////////////////////////////////////////////////////////
#include <ACGL/Math/Constants.hh>
#include <ACGL/Math/Functions.hh>
...
...
include/ACGL/OpenGL/Objects/Buffer.hh
View file @
bd934fce
...
...
@@ -169,29 +169,29 @@ public:
//! Set data for this buffer. Use only to init the buffer!
//! Note: The function is not const, because it changes the corresponding GPU data
inline
void
setData
(
GLenum
_target
,
GLsizeiptr
_size
,
const
GLvoid
*
_pData
=
NULL
,
GLenum
_usage
=
GL_STATIC_DRAW
)
{
mSize
=
_size
;
inline
void
setData
(
GLenum
_target
,
GLsizeiptr
_size
InBytes
,
const
GLvoid
*
_pData
=
NULL
,
GLenum
_usage
=
GL_STATIC_DRAW
)
{
mSize
=
_size
InBytes
;
bind
(
_target
);
glBufferData
(
_target
,
_size
,
_pData
,
_usage
);
glBufferData
(
_target
,
_size
InBytes
,
_pData
,
_usage
);
openGLRareError
();
}
//! Set data for this buffer at the last used target. Use only to init the buffer!
inline
void
setData
(
GLsizeiptr
_size
,
const
GLvoid
*
_pData
=
NULL
,
GLenum
_usage
=
GL_STATIC_DRAW
)
{
setData
(
mTarget
,
_size
,
_pData
,
_usage
);
inline
void
setData
(
GLsizeiptr
_size
InBytes
,
const
GLvoid
*
_pData
=
NULL
,
GLenum
_usage
=
GL_STATIC_DRAW
)
{
setData
(
mTarget
,
_size
InBytes
,
_pData
,
_usage
);
}
//! Use this to modify the buffer
inline
void
setSubData
(
GLenum
_target
,
GLintptr
_offset
,
GLsizeiptr
_size
,
const
GLvoid
*
_pData
)
{
GLsizeiptr
_size
InBytes
,
const
GLvoid
*
_pData
)
{
bind
(
_target
);
glBufferSubData
(
_target
,
_offset
,
_size
,
_pData
);
glBufferSubData
(
_target
,
_offset
,
_size
InBytes
,
_pData
);
openGLRareError
();
}
//! Use this to modify the buffer
inline
void
setSubData
(
GLintptr
_offset
,
GLsizeiptr
_size
,
const
GLvoid
*
_pData
)
{
setSubData
(
mTarget
,
_offset
,
_size
,
_pData
);
inline
void
setSubData
(
GLintptr
_offset
,
GLsizeiptr
_size
InBytes
,
const
GLvoid
*
_pData
)
{
setSubData
(
mTarget
,
_offset
,
_size
InBytes
,
_pData
);
}
...
...
@@ -316,7 +316,7 @@ public:
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
GLint64
mSize
;
// as this might get queried often (e.g. ArrayBuffer) we will explicitly mirror it in RAM
)
GLint64
mSize
;
// as this might get queried often (e.g. ArrayBuffer) we will explicitly mirror it in RAM
- bytes
SharedBufferObject
mBuffer
;
GLenum
mTarget
;
};
...
...
include/ACGL/OpenGL/Objects/ShaderProgram.hh
View file @
bd934fce
...
...
@@ -284,7 +284,7 @@ public:
//! set the texture to the texture unit the uniform is set to.
//! Note: it is not guaranteed that all uniforms for textures are set to unique samplers by default after linking!
void
setTexture
(
const
std
::
string
&
_nameInShader
,
const
ConstSharedTexture
&
_texture
)
{
void
setTexture
(
const
std
::
string
&
_nameInShader
,
const
ConstSharedTexture
&
_texture
)
const
{
GLint
unit
;
GLint
uniformLocation
=
getUniformLocation
(
_nameInShader
);
if
(
uniformLocation
!=
-
1
)
{
...
...
src/ACGL/OpenGL/Controller/ShaderProgramControlFiles.cc
View file @
bd934fce
...
...
@@ -128,17 +128,7 @@ void ShaderProgramControlFiles::setBindings(SharedShaderProgram &_shaderProgram)
_shaderProgram
->
setFragmentDataLocations
(
mFragmentDataLocations
);
// will relink on it's own
SharedLocationMappings
oldMap
=
_shaderProgram
->
getAttributeLocations
();
Utils
::
debug
()
<<
"oldmap:"
<<
std
::
endl
;
oldMap
->
printMapping
();
Utils
::
debug
()
<<
"mAttributeLocations before:"
<<
std
::
endl
;
mAttributeLocations
->
printMapping
();
mAttributeLocations
->
addLocations
(
oldMap
);
// add as many old locations as possible without destoying the location map
Utils
::
debug
()
<<
"mAttributeLocations after:"
<<
std
::
endl
;
mAttributeLocations
->
printMapping
();
_shaderProgram
->
setAttributeLocations
(
mAttributeLocations
);
// will relink on it's own
# else
if
(
(
mAttributeLocations
->
getSize
()
>
0
)
&&
(
mFragmentDataLocations
->
getSize
()
>
0
)
)
{
...
...
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