Commit 80fef77f authored by Sylvain Thery's avatar Sylvain Thery

add dll support to shader_radiance

parent 0390e0f1
......@@ -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; }
......
......@@ -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();
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment