Assorted edits. Created new shaders.

This commit is contained in:
2014-05-06 16:36:46 -04:30
parent f04c5806d1
commit 31dd89f30e
7 changed files with 30 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
#ifdef GL_ES
precision mediump float;
#endif
// Light color.
uniform vec3 u_lightColor;
// Diffuse surface color.
uniform vec3 u_diffColor;
// Specular color.
uniform vec3 u_specColor;
// Ambient light color.
uniform vec3 u_ambColor;
void main(){
// TODO: Implement per pixel diffuse lighting.
gl_FragColor = vec4(u_diffColor, 1.0);
}

View File

@@ -0,0 +1,9 @@
// Model-view matrix.
uniform mat4 u_projTrans;
// Vertex position in world coordinates.
attribute vec4 a_position;
void main(){
gl_Position = u_projTrans * a_position;
}

View File

@@ -143,4 +143,4 @@ JNIEXPORT jdouble JNICALL Java_ve_ucv_ciens_ccg_nxtar_MainActivity_calibrateCame
return error;
}
}
} // extern "C"

View File

@@ -500,4 +500,4 @@ float perimeter(points_vector & p){
Marker::~Marker(){
points.clear();
}
}
} // namespace nxtar

View File

@@ -51,6 +51,6 @@ bool findCalibrationPattern(points_vector &, cv::Mat &);
*/
double getCameraParameters(cv::Mat &, cv::Mat &, std::vector<points_vector> &, cv::Size);
}
} // namespace nxtar
#endif
#endif // MARKER_HPP