Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Luis Penaranda
panoramic
Commits
05a8962f
Commit
05a8962f
authored
Jan 23, 2013
by
Luis Peñaranda
Browse files
read max fov from rc file
parent
25566466
Changes
2
Hide whitespace changes
Inline
Side-by-side
openglcanvas.cpp
View file @
05a8962f
...
...
@@ -38,8 +38,6 @@ OpenGLCanvas::OpenGLCanvas(QWidget *parent) :
time_timer
.
setInterval
(
0
);
connect
(
&
time_timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
slotTimer
()));
time_start
=
time_time
.
time
();
fprintf
(
stderr
,
"scale=%f
\n
fov_max=%f
\n
"
,
scale
,
fov_max
);
}
void
OpenGLCanvas
::
slotTimer
(
void
)
{
...
...
@@ -151,6 +149,7 @@ void OpenGLCanvas::read_config_file(){
shader_dir
[
0
]
=
'\0'
;
input_image_file
=
(
char
*
)
malloc
(
512
*
sizeof
(
char
));
input_image_file
[
0
]
=
'\0'
;
char
*
max_fov_str
=
(
char
*
)
malloc
(
64
*
sizeof
(
char
));
struct
stat
testbuf
;
if
(
stat
(
filepath
,
&
testbuf
)){
fprintf
(
stderr
,
"~/.panorc does not exist
\n
"
);
...
...
@@ -180,6 +179,13 @@ void OpenGLCanvas::read_config_file(){
input_image_file
[
strlen
(
line
)
-
12
]
=
'\0'
;
fprintf
(
stderr
,
"input_image_file=%s
\n
"
,
input_image_file
);
}
// check for 'max_fov' option
if
(
!
strncmp
(
line
,
"max_fov="
,
8
)){
strcpy
(
max_fov_str
,
line
+
8
);
max_fov_str
[
strlen
(
line
)
-
9
]
=
'\0'
;
fov_max
=
atof
(
max_fov_str
);
fprintf
(
stderr
,
"max_fov=%f
\n
"
,
fov_max
);
}
}
fclose
(
rcfile
);
}
...
...
openglcanvas.h
View file @
05a8962f
...
...
@@ -95,7 +95,6 @@ private:
//float windowWidth;
//float windowHeight;
// options set in the rc file
char
*
shader_dir
;
char
*
input_image_file
;
...
...
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