Commit d8c970c0 by Luis Penaranda

towards passing automatically ZB parameters

1 parent f1178162
......@@ -709,6 +709,12 @@ void OpenGLCanvas::setShaders() {
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,f);
......
......@@ -6,7 +6,9 @@ float u, v, x, y, z;
varying float r, theta, s;
float lambda, 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){
......@@ -85,7 +87,6 @@ void main(void){
u=x/(-z);
v=y/(-z);
// Z-B transformation
// TODO: read zblambda and zbR from the interface
zblambda=0.1;
zbR=1.0;
zbalpha=atan(v,u);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!