Commit d8c970c0 authored by Luis Penaranda's avatar Luis Penaranda

towards passing automatically ZB parameters

parent f1178162
...@@ -709,6 +709,12 @@ void OpenGLCanvas::setShaders() { ...@@ -709,6 +709,12 @@ void OpenGLCanvas::setShaders() {
GLuint p = glCreateProgram(); GLuint p = glCreateProgram();
// Bind attributes zblambda and zbR to the vertex shader
glVertexAttrib1f(0,zblambda);
glBindAttribLocation(p,0,"zblambda");
glVertexAttrib1f(1,zbR);
glBindAttribLocation(p,1,"zbR");
glAttachShader(p,v); glAttachShader(p,v);
glAttachShader(p,f); glAttachShader(p,f);
......
...@@ -6,7 +6,9 @@ float u, v, x, y, z; ...@@ -6,7 +6,9 @@ float u, v, x, y, z;
varying float r, theta, s; varying float r, theta, s;
float lambda, phi; float lambda, phi;
float extent, scale, vis_mode, center_lambda, center_phi; float extent, scale, vis_mode, center_lambda, center_phi;
varying float zblambda,zbr,zbR,zbalpha,zbrho; float zbr,zbalpha,zbrho;
/*attribute*/ float zblambda;
/*attribute*/ float zbR;
void main(void){ void main(void){
...@@ -85,7 +87,6 @@ void main(void){ ...@@ -85,7 +87,6 @@ void main(void){
u=x/(-z); u=x/(-z);
v=y/(-z); v=y/(-z);
// Z-B transformation // Z-B transformation
// TODO: read zblambda and zbR from the interface
zblambda=0.1; zblambda=0.1;
zbR=1.0; zbR=1.0;
zbalpha=atan(v,u); zbalpha=atan(v,u);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment