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
ce04d9bc
Commit
ce04d9bc
authored
Feb 05, 2012
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
acgl compiles on VS2010
parent
a66f5cfb
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
281 additions
and
251 deletions
+281
-251
include/ACGL/ACGL.hh
include/ACGL/ACGL.hh
+8
-2
include/ACGL/Animations/EaseFunctions.hh
include/ACGL/Animations/EaseFunctions.hh
+7
-7
include/ACGL/Base/FileHelpers.hh
include/ACGL/Base/FileHelpers.hh
+5
-1
include/ACGL/Math/Constants.hh
include/ACGL/Math/Constants.hh
+2
-2
include/ACGL/Math/Functions.hh
include/ACGL/Math/Functions.hh
+2
-2
include/ACGL/Math/Math.hh
include/ACGL/Math/Math.hh
+12
-0
include/ACGL/OpenGL/Objects/FrameBufferObject.hh
include/ACGL/OpenGL/Objects/FrameBufferObject.hh
+8
-4
src/ACGL/Animations/Animation.cc
src/ACGL/Animations/Animation.cc
+1
-1
src/ACGL/OpenGL/EXT_direct_state_access.cc
src/ACGL/OpenGL/EXT_direct_state_access.cc
+234
-225
src/ACGL/OpenGL/Tools.cc
src/ACGL/OpenGL/Tools.cc
+2
-7
No files found.
include/ACGL/ACGL.hh
View file @
ce04d9bc
...
...
@@ -38,14 +38,20 @@
* namespace ptr = ACGL::Base;
*
*/
#if (__cplusplus >= 201103L)
// C++11:
# include <memory>
namespace
ptr
=
std
;
#else
// C++98 and TR1:
# include <tr1/memory>
namespace
ptr
=
std
::
tr1
;
# ifdef _MSC_VER
# include <memory>
namespace
ptr
=
std
;
# else
# include <tr1/memory>
namespace
ptr
=
std
::
tr1
;
# endif
#endif
#include <ACGL/Base/CompileTimeSettings.hh>
...
...
include/ACGL/Animations/EaseFunctions.hh
View file @
ce04d9bc
...
...
@@ -86,7 +86,7 @@ public:
if
(
_progress
<
0.5
)
return
2.0
f
*
_progress
*
_progress
;
else
return
1.0
f
-
2.0
f
*
pow
(
_progress
-
1.0
f
,
2.0
);
return
1.0
f
-
2.0
f
*
pow
(
_progress
-
1.0
f
,
2.0
f
);
}
};
...
...
@@ -99,7 +99,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
sin
(
0.5
f
*
M_PI
*
mFrequency
*
_progress
);
return
sin
(
0.5
f
*
(
float
)
M_PI
*
mFrequency
*
_progress
);
}
float
mFrequency
;
...
...
@@ -113,7 +113,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
2
*
fmin
(
_progress
,
1
-
_progress
);
return
2.0
f
*
Math
::
Functions
::
min
(
_progress
,
1.0
f
-
_progress
);
}
};
class
BlendSin
:
public
EaseFunction
...
...
@@ -124,7 +124,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
sin
(
20
*
M_PI
*
_progress
);
return
sin
(
20
*
(
float
)
M_PI
*
_progress
);
}
};
class
BlendCos
:
public
EaseFunction
...
...
@@ -135,7 +135,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
cos
(
6
*
M_PI
*
_progress
)
-
1.0
f
;
return
cos
(
6
*
(
float
)
M_PI
*
_progress
)
-
1.0
f
;
}
};
class
BlendSinDamped
:
public
EaseFunction
...
...
@@ -146,7 +146,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
2
*
fmin
(
_progress
,
1
-
_progress
)
*
sin
(
10
*
M_PI
*
_progress
);
return
2
.0
f
*
Math
::
Functions
::
min
(
_progress
,
1.0
f
-
_progress
)
*
sin
(
10.0
f
*
(
float
)
M_PI
*
_progress
);
}
};
class
BlendCosDamped
:
public
EaseFunction
...
...
@@ -157,7 +157,7 @@ public:
virtual
float
value
(
const
float
_progress
)
{
return
2
*
fmin
(
_progress
,
1.0
f
-
_progress
)
*
cos
(
10.0
f
*
M_PI
*
_progress
);
return
2
.0
f
*
Math
::
Functions
::
min
(
_progress
,
1.0
f
-
_progress
)
*
cos
(
10.0
f
*
(
float
)
M_PI
*
_progress
);
}
};
...
...
include/ACGL/Base/FileHelpers.hh
View file @
ce04d9bc
...
...
@@ -10,7 +10,11 @@
#include <vector>
#include <time.h>
#include <utime.h>
#ifdef _MSC_VER
# include <sys/utime.h>
#else
# include <utime.h>
#endif
#include <sys/stat.h>
#include <ACGL/ACGL.hh>
...
...
include/ACGL/Math/Constants.hh
View file @
ce04d9bc
...
...
@@ -54,8 +54,8 @@ template<> inline float SQUARED_EPSILON<float> (void) { return SQUARED_EPSILON_
template
<
>
inline
double
SQUARED_EPSILON
<
double
>
(
void
)
{
return
SQUARED_EPSILON_DOUBLE
;
}
//Sine and Cosine stuff
const
float
PI_FLOAT
=
M_PI
;
const
double
PI_DOUBLE
=
M_PI
;
const
float
PI_FLOAT
=
(
float
)
M_PI
;
const
double
PI_DOUBLE
=
(
double
)
M_PI
;
template
<
typename
T
>
inline
T
PI
(
void
)
{
return
T
();
}
template
<
>
inline
float
PI
<
float
>
(
void
)
{
return
PI_FLOAT
;
}
...
...
include/ACGL/Math/Functions.hh
View file @
ce04d9bc
...
...
@@ -63,8 +63,8 @@ inline double atanDeg(double v) {return (::atan (v) * Constants::RAD_
inline
double
atan2Deg
(
double
a
,
double
b
)
{
return
(
::
atan2
(
a
,
b
)
*
Constants
::
RAD_TO_DEG_DOUBLE
);}
//Helpers
inline
int32_t
round
(
float
a
)
{
return
(
a
<
0.5
f
)
?
ceil
(
a
-
0.5
f
)
:
floor
(
a
+
0.5
f
);}
inline
int32_t
round
(
double
a
)
{
return
(
a
<
0.5
)
?
ceil
(
a
-
0.5
)
:
floor
(
a
+
0.5
);}
inline
int32_t
round
(
float
a
)
{
return
(
int32_t
)
(
(
a
<
0.5
f
)
?
ceil
(
a
-
0.5
f
)
:
floor
(
a
+
0.5
f
)
);}
inline
int32_t
round
(
double
a
)
{
return
(
int32_t
)
(
(
a
<
0.5
)
?
ceil
(
a
-
0.5
)
:
floor
(
a
+
0.5
)
);}
inline
float
pow
(
float
a
,
float
b
)
{
return
::
powf
(
a
,
b
);
}
inline
double
pow
(
double
a
,
double
b
)
{
return
::
pow
(
a
,
b
);
}
...
...
include/ACGL/Math/Math.hh
View file @
ce04d9bc
...
...
@@ -18,9 +18,21 @@
* this, you should never include glm yourself, but include always our ACGL/Math.hh!
*/
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning ( disable : 4201 )
#pragma warning ( disable : 4100 )
#pragma warning ( disable : 4996 )
#pragma warning ( disable : 4244 )
#endif
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#ifdef _MSC_VER
#pragma warning( pop )
#endif
#include <ACGL/Math/Constants.hh>
#include <ACGL/Math/Functions.hh>
...
...
include/ACGL/OpenGL/Objects/FrameBufferObject.hh
View file @
ce04d9bc
...
...
@@ -123,22 +123,26 @@ public:
*/
inline
bool
attachColorRenderBuffer
(
const
std
::
string
&
_name
,
const
ConstSharedRenderBuffer
&
_renderBuffer
)
{
return
attachColorAttachment
(
(
Attachment
){
_name
,
SharedTexture
(),
_renderBuffer
,
mColorAttachments
.
size
()}
);
Attachment
a
=
{
_name
,
SharedTexture
(),
_renderBuffer
,
mColorAttachments
.
size
()};
return
attachColorAttachment
(
a
);
}
inline
bool
attachColorTexture
(
const
std
::
string
&
_name
,
const
ConstSharedTexture
&
_texture
)
{
return
attachColorAttachment
(
(
Attachment
){
_name
,
_texture
,
SharedRenderBuffer
(),
mColorAttachments
.
size
()}
);
Attachment
a
=
{
_name
,
_texture
,
SharedRenderBuffer
(),
mColorAttachments
.
size
()};
return
attachColorAttachment
(
a
);
}
inline
bool
attachColorRenderBuffer
(
const
std
::
string
&
_name
,
const
ConstSharedRenderBuffer
&
_renderBuffer
,
GLuint
_location
)
{
return
attachColorAttachment
(
(
Attachment
){
_name
,
SharedTexture
(),
_renderBuffer
,
_location
}
);
Attachment
a
=
{
_name
,
SharedTexture
(),
_renderBuffer
,
_location
};
return
attachColorAttachment
(
a
);
}
inline
bool
attachColorTexture
(
const
std
::
string
&
_name
,
const
ConstSharedTexture
&
_texture
,
GLuint
_location
)
{
return
attachColorAttachment
(
(
Attachment
){
_name
,
_texture
,
SharedRenderBuffer
(),
_location
}
);
Attachment
a
=
{
_name
,
_texture
,
SharedRenderBuffer
(),
_location
};
return
attachColorAttachment
(
a
);
}
bool
attachColorAttachment
(
const
Attachment
&
_attachment
);
...
...
src/ACGL/Animations/Animation.cc
View file @
ce04d9bc
...
...
@@ -98,7 +98,7 @@ bool AnimationWait::finished()
AnimationSequential
::
AnimationSequential
(
const
int_t
_loops
)
:
mLoops
(
_loops
),
mCurrentPosition
(
0
),
mCurrentPosition
(),
mAnimations
()
{
}
...
...
src/ACGL/OpenGL/EXT_direct_state_access.cc
View file @
ce04d9bc
This diff is collapsed.
Click to expand it.
src/ACGL/OpenGL/Tools.cc
View file @
ce04d9bc
...
...
@@ -105,10 +105,8 @@ bool doesSupportTessellationShader()
const
GLubyte
*
acglErrorString
(
GLenum
_errorCode
)
{
#ifndef ACGL_USE_GLEW
// no gluErrorString on iOS
// this should only get used on OpenGL ES plattforms or if compiled without GLEW, so error strings from the compatibility profile
// are ignored. Only 3.2+ Core and ES 2.0+ errors belong here:
// no gluErrorString on iOS, problems on visual studio...
// Only 3.2+ Core and ES 2.0+ errors belong here:
if
(
_errorCode
==
GL_INVALID_ENUM
)
{
return
(
GLubyte
*
)
"GL_INVALID_ENUM"
;
}
else
if
(
_errorCode
==
GL_INVALID_VALUE
)
{
return
(
GLubyte
*
)
"GL_INVALID_VALUE"
;
}
else
if
(
_errorCode
==
GL_INVALID_OPERATION
)
{
return
(
GLubyte
*
)
"GL_INVALID_OPERATION"
;
}
...
...
@@ -118,9 +116,6 @@ const GLubyte* acglErrorString( GLenum _errorCode )
else
{
return
(
GLubyte
*
)
"unknown error"
;
}
#else
return
gluErrorString
(
_errorCode
);
#endif
}
...
...
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