Re: Help needed with opengl 4 and glUniform4dv
Posted by siddharth.cmdz on Sep 11, 2014; 3:06am
URL: https://forum.jogamp.org/Help-needed-with-opengl-4-and-glUniform4dv-tp4033134p4033135.html
well i suppose i have a little bit of progress...it seems like i had to define my matrix in the shader as dmat4 instead of mat4 and that type is only available with glsl 4.0+.
But modifying my vertex shader to use 440 core and using dmat4, i get this error when compiling the shader:
error C7011: implicit cast from "f64vec4" to "vec4"
Im also wondering its a required to use glVertexAttribLpointer...
Any ideas folks?
Vertex Shader
#version 440 core
layout(location = 0) in vec4 vPosition;
layout(location = 1) in vec4 vColor;
uniform dmat4 mvp;
out vec4 color;
void main() {
color = vColor;
gl_Position = mvp * vPosition;
}
Fragment Shader
#version 440 core
out vec4 fColor;
in vec4 vColor;
void main() {
fColor = vColor;
}
Am i going in the right direction?
Please note, I do realize that 64bit precision is rarely needed and should not be used. This is a test for me to verify some of artifacts we get due to zbuffer precision that i would like to verify.
Any help/suggestion is appreciated.
thanks
-Siddharth