Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
41796ace
Commit
41796ace
authored
May 02, 2011
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout CGoGNflush
parent
c1269877
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
2 deletions
+71
-2
Apps/Tuto/tuto5.cpp
Apps/Tuto/tuto5.cpp
+7
-1
README.TXT
README.TXT
+1
-1
include/Utils/cgognStream.h
include/Utils/cgognStream.h
+1
-0
include/Utils/cgognStream.hpp
include/Utils/cgognStream.hpp
+61
-0
src/Utils/cgognStream.cpp
src/Utils/cgognStream.cpp
+1
-0
No files found.
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
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