Hello,
A very dummy program gives the following error:
Fragment info
(0) : error C5052: gl_Vertex is not accessable in this profile
(0) : error C5052: gl_Position is not accessable in this profile
What could i be doing wrong ?
Thanks
Hello,
A very dummy program gives the following error:
(0) : error C5052: gl_Vertex is not accessable in this profile
(0) : error C5052: gl_Position is not accessable in this profile
What could i be doing wrong ?
Thanks
Can you say more things, like posting your dummy sources ?
Hi,
Here is my vertex program:
"\
void main()
\
{
\
gl_Position = ftransform();
\
}
\
"
My fragment program:
"\
void main()
\
{
\
gl_FragColor = vec4(0.4,0.4,0.8,1.0);
\
}
\
"
My function call is:
glLinkProgram( m_Program );
where m_Program is the program id
On a NVidia GO 6800 card, I get the error:
(0) : error C5052: gl_Vertex is not accessable in this profile
(0) : error C5052: gl_Position is not accessable in this profile
On a fx 5900, I get a more verbose error:
Internal error: assembly compile error for vertex shader at offset 336:
– error message –
line 14, column -30: error: program doesn’t write any result registers
– internal assembly text –
!!VP2.0
#vendor NVIDIA Corporation
#version 1.0.02
#profile vp30
#program main
#semantic gl_ModelViewProjectionMatrixTranspose
#var float4 gl_Vertex : $vin.ATTR0 : ATTR0 : -1 : 1
#var float4x4 gl_ModelViewProjectionMatrixTranspose : : c[0], 4 : -1 : 1
BB1:
END
(0) : error C5052: gl_Vertex is not accessable in this profile
(0) : error C5052: gl_Position is not accessable in this profile
I hope someone has some idea on whats wrong.
Thanks,
If you post a exe I’ll have a look.
I bet you are incorrectly supplying the strings to OpenGL…
Looks like the compiler generated empty programs.
If that is C you don’t need to put \ at the end of lines to concatenate strings, just put " " around each line.
You can use glGetShaderSource to see if source strings OpenGL has are what you think you sent.
Just to ensure (sorry if it’s so easy, but we never know), did you well compiled the shaders first before linking them ?
(sorry again if that’s noway)
Hi folks,
I got past that So now I am storing programs as strings in classes.
I have to declare
private:
static const char* vertexShader;
static const char* fragmentShader;
and fill it up in the cpp file. If I try to init in header, things mess up.
Thanks all.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.