Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
5fcb3fc3
Commit
5fcb3fc3
authored
Jan 30, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'develop'
Develop See merge request !35
parents
e66c4530
bc2e1c32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
+1
-3
include/Utils/Shaders/shaderRadiancePerVertex.h
include/Utils/Shaders/shaderRadiancePerVertex.h
+2
-2
src/Utils/Shaders/shaderRadiancePerVertex.cpp
src/Utils/Shaders/shaderRadiancePerVertex.cpp
+6
-5
No files found.
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
View file @
5fcb3fc3
...
...
@@ -260,11 +260,9 @@ MapHandlerGen* Surface_Radiance_Plugin::importFromFile(const QString& fileName)
mapParams
.
paramVBO
=
new
Utils
::
VBO
();
mapParams
.
paramVBO
->
updateData
(
mapParams
.
param
);
mapParams
.
radiancePerVertexShader
=
new
Utils
::
ShaderRadiancePerVertex
();
mapParams
.
radiancePerVertexShader
=
new
Utils
::
ShaderRadiancePerVertex
(
SH_TYPE
::
get_resolution
()
);
registerShader
(
mapParams
.
radiancePerVertexShader
);
mapParams
.
radiancePerVertexShader
->
compile
(
SH_TYPE
::
get_resolution
());
mapParams
.
radiancePerVertexShader
->
setAttributeRadiance
(
mapParams
.
paramVBO
,
mapParams
.
radianceTexture
,
GL_TEXTURE1
);
// compute map bounding box
...
...
include/Utils/Shaders/shaderRadiancePerVertex.h
View file @
5fcb3fc3
...
...
@@ -62,11 +62,11 @@ protected:
static
int
index
(
int
l
,
int
m
)
{
return
l
*
(
l
+
1
)
+
m
;
}
// compute indices in K_tab
public:
ShaderRadiancePerVertex
();
ShaderRadiancePerVertex
(
int
resolution
);
~
ShaderRadiancePerVertex
()
;
void
compile
(
int
resolution
);
void
compile
();
void
setCamera
(
Geom
::
Vec3f
camera
)
;
...
...
src/Utils/Shaders/shaderRadiancePerVertex.cpp
View file @
5fcb3fc3
...
...
@@ -34,15 +34,17 @@ namespace Utils
#include "shaderRadiancePerVertex.geom"
#include "shaderRadiancePerVertex.frag"
ShaderRadiancePerVertex
::
ShaderRadiancePerVertex
()
:
ShaderRadiancePerVertex
::
ShaderRadiancePerVertex
(
int
resolution
)
:
m_vboPos
(
NULL
),
m_vboNorm
(
NULL
),
m_vboParam
(
NULL
),
m_tex_ptr
(
NULL
),
m_tex_unit
(
-
1
),
m_resolution
(
-
1
),
m_resolution
(
resolution
),
K_tab
(
NULL
)
{}
{
compile
();
}
ShaderRadiancePerVertex
::~
ShaderRadiancePerVertex
()
{
...
...
@@ -50,13 +52,12 @@ ShaderRadiancePerVertex::~ShaderRadiancePerVertex()
delete
[]
K_tab
;
}
void
ShaderRadiancePerVertex
::
compile
(
int
resolution
)
void
ShaderRadiancePerVertex
::
compile
()
{
m_nameVS
=
"ShaderRadiancePerVertex_vs"
;
m_nameFS
=
"ShaderRadiancePerVertex_fs"
;
m_nameGS
=
"ShaderRadiancePerVertex_gs"
;
m_resolution
=
resolution
;
const
int
nb_coefs
=
(
m_resolution
+
1
)
*
(
m_resolution
+
1
);
if
(
m_resolution
!=
-
1
)
{
...
...
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