Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Cazier
CGoGN
Commits
80fef77f
Commit
80fef77f
authored
Mar 04, 2015
by
Sylvain Thery
Browse files
add dll support to shader_radiance
parent
0390e0f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
CGoGN/include/Utils/Shaders/shaderRadiancePerVertex.h
View file @
80fef77f
...
...
@@ -30,13 +30,15 @@
#include
"Utils/textures.h"
#include
"Geometry/vector_gen.h"
#include
"Utils/dll.h"
namespace
CGoGN
{
namespace
Utils
{
class
ShaderRadiancePerVertex
:
public
ClippingShader
class
CGoGN_UTILS_API
ShaderRadiancePerVertex
:
public
ClippingShader
{
protected:
// shader sources
...
...
@@ -74,7 +76,7 @@ public:
void
compile
();
void
setCamera
(
Geom
::
Vec3f
&
camera
);
void
setCamera
(
const
Geom
::
Vec3f
&
camera
);
void
setFragInterp
(
bool
fraginterp
);
bool
getFragInterp
()
{
return
m_fragInterp
;
}
...
...
CGoGN/src/Utils/Shaders/shaderRadiancePerVertex.cpp
View file @
80fef77f
...
...
@@ -21,6 +21,7 @@
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#define CGoGN_UTILS_DLL_EXPORT 1
#include
"Utils/Shaders/shaderRadiancePerVertex.h"
...
...
@@ -134,7 +135,7 @@ void ShaderRadiancePerVertex::compile()
unbind
();
}
void
ShaderRadiancePerVertex
::
setCamera
(
Geom
::
Vec3f
&
camera
)
void
ShaderRadiancePerVertex
::
setCamera
(
const
Geom
::
Vec3f
&
camera
)
{
m_camera
=
camera
;
bind
();
...
...
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
View file @
80fef77f
...
...
@@ -64,7 +64,7 @@ void Surface_Radiance_Plugin::drawMap(View* view, MapHandlerGen* map)
qglviewer
::
Vec
c
=
view
->
getCurrentCamera
()
->
position
();
PFP2
::
VEC3
camera
(
c
.
x
,
c
.
y
,
c
.
z
);
p
.
radiancePerVertexShader
->
setCamera
(
camera
);
p
.
radiancePerVertexShader
->
setCamera
(
Geom
::
Vec3f
(
camera
[
0
],
camera
[
1
],
camera
[
2
]));
// convert to Vec3f because PFP2 can hold Vec3d !
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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