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
41796ace
Commit
41796ace
authored
May 02, 2011
by
Sylvain Thery
Browse files
ajout CGoGNflush
parent
c1269877
Changes
5
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/tuto5.cpp
View file @
41796ace
...
...
@@ -68,24 +68,29 @@ void MyQT::balls_onoff(bool x)
{
render_balls
=
!
render_balls
;
updateGL
();
CGoGNerr
<<
" balls_onoff "
<<
CGoGNendl
;
}
void
MyQT
::
vectors_onoff
(
bool
x
)
{
render_vectors
=
!
render_vectors
;
updateGL
();
CGoGNerr
<<
" vectors_onoff "
<<
CGoGNflush
;
}
void
MyQT
::
text_onoff
(
bool
x
)
{
render_text
=
!
render_text
;
updateGL
();
CGoGNerr
<<
" text_onoff "
<<
CGoGNflush
;
}
void
MyQT
::
topo_onoff
(
bool
x
)
{
render_topo
=
!
render_topo
;
updateGL
();
CGoGNerr
<<
" topo_onoff "
<<
CGoGNflush
;
}
void
MyQT
::
slider_balls
(
int
x
)
...
...
@@ -305,7 +310,8 @@ int main(int argc, char **argv)
CGoGNdbg2
.
toConsole
(
&
sqt
);
CGoGNerr
.
toConsole
(
&
sqt
);
CGoGNdbg2
<<
" TextureSize "
<<
texSize
<<
CGoGNendl
;
CGoGNerr
<<
" ERROR "
<<
5
*
7
<<
CGoGNendl
;
CGoGNerr
<<
" ERROR "
<<
5
*
7
<<
CGoGNflush
;
// et on attend la fin.
return
app
.
exec
();
...
...
README.TXT
View file @
41796ace
Dépendences Linux:
installer les paquets suivants:
cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev lizip-dev libqt4-
help
qt4-designer qt4-dev-tools
cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev lizip-dev libqt4-
dev
qt4-designer qt4-dev-tools
Pour compiler CGoGN:
...
...
include/Utils/cgognStream.h
View file @
41796ace
...
...
@@ -187,6 +187,7 @@ extern CGoGNStream::Dbg<1> CGoGNdbg;
extern
CGoGNStream
::
Dbg
<
2
>
CGoGNdbg2
;
extern
CGoGNStream
::
Dbg
<
3
>
CGoGNdbg3
;
extern
CGoGNStream
::
Special
CGoGNendl
;
extern
CGoGNStream
::
Special
CGoGNflush
;
}
// namespace CGoGN
...
...
include/Utils/cgognStream.hpp
View file @
41796ace
...
...
@@ -246,6 +246,67 @@ Out<LEVEL>& Out<LEVEL>::operator<< (Special& os )
}
}
}
if
(
&
os
==
&
CGoGNflush
)
{
char
bufc
[
512
];
// for cout & cerr just do the endl
if
(
m_out_mode
&
STDOUT
)
std
::
cout
<<
std
::
flush
;
if
(
m_out_mode
&
STDERR
)
std
::
cerr
<<
std
::
flush
;
if
(
m_out_mode
&
FILEOUT
)
{
while
(
!
m_buffer
.
eof
())
{
m_buffer
.
getline
(
bufc
,
512
);
*
m_ofs
<<
bufc
<<
std
::
flush
;
}
}
if
(
m_out_mode
&
QTSTATUSBAR
)
{
while
(
!
m_buffer
.
eof
())
{
m_buffer
.
getline
(
bufc
,
512
);
m_sqt_bar
->
statusMsg
(
bufc
);
}
}
if
(
m_out_mode
&
QTCONSOLE
)
{
while
(
!
m_buffer
.
eof
())
{
m_buffer
.
getline
(
bufc
,
512
);
if
(
m_code
>=
100
)
m_sqt_console
->
console
()
->
setTextColor
(
QColor
(
0
,
150
-
(
m_code
-
100
)
*
20
,
50
+
(
m_code
-
100
)
*
20
));
else
{
if
(
m_code
>
0
)
m_sqt_console
->
console
()
->
setTextColor
(
QColor
(
150
,
0
,
0
));
else
m_sqt_console
->
console
()
->
setTextColor
(
QColor
(
0
,
0
,
150
));
}
m_sqt_console
->
console
()
->
moveCursor
(
QTextCursor
::
End
);
m_sqt_console
->
console
()
->
insertPlainText
(
QString
(
bufc
));
}
}
if
(
m_out_mode
&
SSBUFFER
)
{
while
(
!
m_buffer
.
eof
())
{
m_buffer
.
getline
(
bufc
,
512
);
*
m_oss
<<
bufc
<<
std
::
flush
;
}
}
}
}
m_buffer
.
clear
();
...
...
src/Utils/cgognStream.cpp
View file @
41796ace
...
...
@@ -40,6 +40,7 @@ CGoGNStream::Dbg<1> CGoGNdbg;
CGoGNStream
::
Dbg
<
2
>
CGoGNdbg2
;
CGoGNStream
::
Dbg
<
3
>
CGoGNdbg3
;
CGoGNStream
::
Special
CGoGNendl
;
CGoGNStream
::
Special
CGoGNflush
;
namespace
CGoGNStream
{
...
...
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