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
d9d9badc
Commit
d9d9badc
authored
Nov 02, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug corrections
parent
8433dead
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
include/Utils/drawer.h
include/Utils/drawer.h
+1
-6
include/Utils/text3d.h
include/Utils/text3d.h
+3
-3
src/Utils/drawer.cpp
src/Utils/drawer.cpp
+3
-0
src/Utils/text3d.cpp
src/Utils/text3d.cpp
+2
-0
No files found.
include/Utils/drawer.h
View file @
d9d9badc
...
...
@@ -129,12 +129,7 @@ public:
/**
* use as a glCallList
*/
void
callList
();
/**
* use as a glCallList
*/
void
callList
(
float
opacity
)
{
m_shader
->
setOpacity
(
opacity
);
callList
();
}
void
callList
(
float
opacity
=
1.0
f
);
/**
* use as glLineWidth
...
...
include/Utils/text3d.h
View file @
d9d9badc
...
...
@@ -130,7 +130,7 @@ public:
*/
void
drawAll
(
const
Geom
::
Vec4f
&
color
);
void
drawAll
(
const
Geom
::
Vec3f
&
color
){
drawAll
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
1.0
f
));
}
void
drawAll
(
const
Geom
::
Vec3f
&
color
){
drawAll
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
m_color
[
3
]
));
}
/**
...
...
@@ -139,7 +139,7 @@ public:
*/
void
predraw
(
const
Geom
::
Vec4f
&
color
);
void
predraw
(
const
Geom
::
Vec3f
&
color
){
predraw
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
1.0
f
));
}
void
predraw
(
const
Geom
::
Vec3f
&
color
){
predraw
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
m_color
[
3
]
));
}
/**
...
...
@@ -148,7 +148,7 @@ public:
*/
void
changeColor
(
const
Geom
::
Vec4f
&
color
);
void
changeColor
(
const
Geom
::
Vec3f
&
color
){
changeColor
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
1.0
f
));
}
void
changeColor
(
const
Geom
::
Vec3f
&
color
){
changeColor
(
Geom
::
Vec4f
(
color
[
0
],
color
[
1
],
color
[
2
],
m_color
[
3
]
));
}
/**
* change opacity but keep color (0 is totally transparent 1 is totally opaque)
...
...
src/Utils/drawer.cpp
View file @
d9d9badc
...
...
@@ -171,6 +171,8 @@ void Drawer::callList(float opacity)
if
(
m_begins
.
empty
())
return
;
m_shader
->
setOpacity
(
opacity
);
m_shader
->
enableVertexAttribs
();
for
(
std
::
vector
<
PrimParam
>::
iterator
pp
=
m_begins
.
begin
();
pp
!=
m_begins
.
end
();
++
pp
)
{
...
...
@@ -184,6 +186,7 @@ void Drawer::callList(float opacity)
}
void
Drawer
::
toSVG
(
Utils
::
SVG
::
SVGOut
&
svg
)
{
const
Geom
::
Vec3f
*
ptrP
=
reinterpret_cast
<
Geom
::
Vec3f
*>
(
m_vboPos
->
lockPtr
());
...
...
src/Utils/text3d.cpp
View file @
d9d9badc
...
...
@@ -106,6 +106,8 @@ Strings3D::Strings3D(bool withBackground, const Geom::Vec3f& bgc, bool with_plan
*
m_uniform_planeY
=
glGetUniformLocation
(
program_handler
(),
"planeY"
);
}
unbind
();
m_color
=
Geom
::
Vec4f
(
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
);
}
void
Strings3D
::
setScale
(
float
scale
)
...
...
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