diff --git a/extended_controls.ui b/extended_controls.ui
index bf63cd5845bd650d897f7732d9e6edccf202b835..99c0a6757cb5eb84af3e556bb7785b2e39d5c174 100644
--- a/extended_controls.ui
+++ b/extended_controls.ui
@@ -18,288 +18,344 @@
-
- -
-
-
- Close
-
-
-
- -
-
-
- Shrink all
-
-
-
- -
-
-
- 1
-
-
- 359
-
-
- 60
-
-
- Qt::Vertical
-
-
- QSlider::NoTicks
-
-
- 10
-
-
-
- -
-
-
- 1
-
-
- 359
-
-
- 60
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Shrink computation
-
-
-
- -
-
-
- FOV
-
-
-
- -
-
-
- Visualization
-
-
-
- -
-
-
- FOV max
-
-
-
- -
-
-
- false
-
-
- 0
-
-
-
-
- Simple
-
-
- -
-
- Square Root
-
-
- -
-
- Linear
-
-
- -
-
- Square Power
-
-
- -
-
- Cubic Power
-
-
- -
-
- Logarithm
-
-
-
-
- -
-
-
- QFrame::NoFrame
-
-
- 3
-
-
- QLCDNumber::Flat
-
-
-
- -
-
-
- QFrame::NoFrame
-
-
- 3
-
-
- QLCDNumber::Flat
-
-
-
- -
-
-
- Input Image
-
-
-
- -
-
-
- true
-
-
-
- 0
- 0
-
-
-
- Auto FOV max
-
-
-
- -
-
-
-
-
- Moebius
-
-
- -
-
- 3D Sphere
-
-
- -
-
- Equi-Rectangular
-
-
- -
-
- Perspective
-
-
- -
-
- Stereographic
-
-
- -
-
- Orthographic
-
-
- -
-
- Mercator
-
-
- -
-
- Zorin-Barr
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- 1
-
-
- 1000
-
-
- 100
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- Re-center
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- 1
-
-
- 1000
-
-
- 100
-
-
- Qt::Horizontal
-
-
-
-
+
+
+
+ 9
+ 9
+ 1110
+ 673
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 1120
+ 9
+ 150
+ 671
+
+
+
+ -
+
+
-
+
+
+ Visualization
+
+
+
+ -
+
+
-
+
+ Moebius
+
+
+ -
+
+ 3D Sphere
+
+
+ -
+
+ Equi-Rectangular
+
+
+ -
+
+ Perspective
+
+
+ -
+
+ Stereographic
+
+
+ -
+
+ Orthographic
+
+
+ -
+
+ Mercator
+
+
+ -
+
+ Zorin-Barr
+
+
+
+
+ -
+
+
+ Shrink computation
+
+
+
+ -
+
+
+ false
+
+
+ 0
+
+
-
+
+ Simple
+
+
+ -
+
+ Square Root
+
+
+ -
+
+ Linear
+
+
+ -
+
+ Square Power
+
+
+ -
+
+ Cubic Power
+
+
+ -
+
+ Logarithm
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ 1
+
+
+ 1000
+
+
+ 100
+
+
+ 100
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ lambda
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ 1
+
+
+ 1000
+
+
+ 100
+
+
+ 100
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ R
+
+
+
+
+
+ -
+
+
-
+
+
+ Shrink all
+
+
+
+ -
+
+
+ true
+
+
+
+ 0
+ 0
+
+
+
+ Auto FOV max
+
+
+
+
+
+ -
+
+
-
+
+
+ FOV
+
+
+
+ -
+
+
+ QFrame::NoFrame
+
+
+ 3
+
+
+ QLCDNumber::Flat
+
+
+
+ -
+
+
+ 1
+
+
+ 359
+
+
+ 60
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ QFrame::NoFrame
+
+
+ 3
+
+
+ QLCDNumber::Flat
+
+
+
+ -
+
+
+ 1
+
+
+ 359
+
+
+ 60
+
+
+ Qt::Vertical
+
+
+ QSlider::NoTicks
+
+
+ 10
+
+
+
+ -
+
+
+ FOV max
+
+
+
+
+
+ -
+
+
-
+
+
+ Re-center
+
+
+
+ -
+
+
+ Input Image
+
+
+
+ -
+
+
+ Close
+
+
+
+
+
+
+
diff --git a/openglcanvas.cpp b/openglcanvas.cpp
index a9a0ed906b31d00c232d8f4b0be2edd81e8d257a..2ed81e843bef7f99a050f372b04e2e76ac2934c7 100644
--- a/openglcanvas.cpp
+++ b/openglcanvas.cpp
@@ -28,6 +28,15 @@
//#define CONST_PI_F (0x1.921fb6p+1f)
//#define CONST_PI_2_F (0x1.921fb6p+0f)
+// These definitions specify which attributes should be used to store some
+// parameters passed to the vertex shader. Nvidia hardware
+// only leaves attributes 1 and 7 unreserved; attributes 8 to 15 are
+// reserved for textures.
+// TODO: we use attributes 14 and 15, which work for Nvidia; we need to
+// test with other hardware.
+#define ZBL_ATTR 14
+#define ZBR_ATTR 15
+
OpenGLCanvas::OpenGLCanvas(QWidget *parent) :
QGLWidget(parent)
{
@@ -99,12 +108,14 @@ void OpenGLCanvas::change_fov_max(int new_fov_max){
void OpenGLCanvas::change_zb_lambda(int new_zb_lambda){
zblambda=(float)new_zb_lambda/1000;
fprintf(stderr,"zb_lambda=%f\n",zblambda);
+ glVertexAttrib1f(ZBL_ATTR,zblambda);
updateGL();
}
void OpenGLCanvas::change_zb_R(int new_zb_R){
- zbR=(float)new_zb_R/1000;
+ zbR=(float)new_zb_R/100;
fprintf(stderr,"zb_R=%f\n",zbR);
+ glVertexAttrib1f(ZBR_ATTR,zbR);
updateGL();
}
@@ -728,13 +739,7 @@ void OpenGLCanvas::setShaders() {
GLuint p = glCreateProgram();
- // Bind attributes zblambda and zbR to the vertex shader. Nvidia hardware
- // only leaves attributes 1 and 7 unreserved; attributes 8 to 15 are
- // reserved for textures.
- // TODO: we use attributes 14 and 15, which work for Nvidia; we need to
- // test with other hardware.
-#define ZBL_ATTR 14
-#define ZBR_ATTR 15
+ // Bind attributes zblambda and zbR to the vertex shader.
glVertexAttrib1f(ZBL_ATTR,zblambda);
glBindAttribLocation(p,ZBL_ATTR,"zblambda");
glVertexAttrib1f(ZBR_ATTR,zbR);
diff --git a/panowindow1.ui b/panowindow1.ui
index 1e01796500622e8b26187c96ff26899422b86147..a83d24cee8eb3c6461320f195ff7c7640aeb5a01 100644
--- a/panowindow1.ui
+++ b/panowindow1.ui
@@ -18,244 +18,336 @@
-
- -
-
-
- FOV
-
-
-
- -
-
-
- QFrame::NoFrame
-
-
- 3
-
-
- QLCDNumber::Flat
-
-
-
- -
-
-
- Re-center
-
-
-
- -
-
-
- Visualization
-
-
-
- -
-
-
- false
-
-
- 0
-
-
-
-
- Simple
-
-
- -
-
- Square Root
-
-
- -
-
- Linear
-
-
- -
-
- Square Power
-
-
- -
-
- Cubic Power
-
-
- -
-
- Logarithm
-
-
-
-
- -
-
-
-
-
- Moebius
-
-
- -
-
- 3D Sphere
-
-
- -
-
- Equi-Rectangular
-
-
- -
-
- Perspective
-
-
- -
-
- Stereographic
-
-
- -
-
- Orthographic
-
-
- -
-
- Mercator
-
-
- -
-
- Zorin-Barr
-
-
-
-
- -
-
-
- 1
-
-
- 359
-
-
- 60
-
-
- Qt::Vertical
-
-
- QSlider::NoTicks
-
-
- 10
-
-
-
- -
-
-
- true
-
-
-
- 0
- 0
-
-
-
- Auto FOV max
-
-
-
- -
-
-
- Shrink computation
-
-
-
- -
-
-
- FOV max
-
-
-
- -
-
-
- 1
-
-
- 359
-
-
- 60
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Input Image
-
-
-
- -
-
-
- QFrame::NoFrame
-
-
- 3
-
-
- QLCDNumber::Flat
-
-
-
- -
-
-
- Shrink all
-
-
-
- -
-
-
- Close
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
-
-
+
+
+
+ 9
+ 9
+ 1111
+ 673
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 1126
+ 9
+ 150
+ 671
+
+
+
+ -
+
+
-
+
+
+ Visualization
+
+
+
+ -
+
+
-
+
+ Moebius
+
+
+ -
+
+ 3D Sphere
+
+
+ -
+
+ Equi-Rectangular
+
+
+ -
+
+ Perspective
+
+
+ -
+
+ Stereographic
+
+
+ -
+
+ Orthographic
+
+
+ -
+
+ Mercator
+
+
+ -
+
+ Zorin-Barr
+
+
+
+
+ -
+
+
+ Shrink computation
+
+
+
+ -
+
+
+ false
+
+
+ 0
+
+
-
+
+ Simple
+
+
+ -
+
+ Square Root
+
+
+ -
+
+ Linear
+
+
+ -
+
+ Square Power
+
+
+ -
+
+ Cubic Power
+
+
+ -
+
+ Logarithm
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Shrink all
+
+
+
+ -
+
+
+ true
+
+
+
+ 0
+ 0
+
+
+
+ Auto FOV max
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 70
+ 0
+
+
+
+ FOV
+
+
+
+ -
+
+
+
+ 46
+ 0
+
+
+
+ QFrame::NoFrame
+
+
+ 3
+
+
+ QLCDNumber::Flat
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 70
+ 0
+
+
+
+ FOV max
+
+
+
+ -
+
+
+
+ 46
+ 0
+
+
+
+ QFrame::NoFrame
+
+
+ 3
+
+
+ QLCDNumber::Flat
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 29
+ 0
+
+
+
+ 1
+
+
+ 359
+
+
+ 60
+
+
+ Qt::Vertical
+
+
+ QSlider::NoTicks
+
+
+ 10
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 29
+ 0
+
+
+
+ 1
+
+
+ 359
+
+
+ 60
+
+
+ Qt::Vertical
+
+
+
+
+
+ -
+
+
-
+
+
+ Re-center
+
+
+
+ -
+
+
+ Input Image
+
+
+
+ -
+
+
+ Close
+
+
+
+
+
+
+
@@ -279,6 +371,8 @@
re_center()
automaxbutton(bool)
shrinkallbutton(bool)
+ change_zb_lambda(int)
+ change_zb_R(int)