Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualjburke4126

Posted 21 December 2012 - 10:30 AM

Yes, 'out' is a reserved keyword, so I changed that in both my vertex shader and fragment shader.  Thanks for that, I feel stupid now.

 

Now the shader compiles correctly, however:

 

 

cgD3D11LoadProgram(vs, flags);
setVertexLayout(vs);  // vs is still null even after being set by cgCreateProgramFromFile, so setVertexLayout causes an Access Violation Exception

 

 

What would be causing this?  My log shows that both cgCreateProgramFromFile and cgD3D11LoadProgram were successful (that is, calling cgGetLastErrorString returns CG_NO_ERROR).


#3jburke4126

Posted 21 December 2012 - 10:30 AM

Yes, 'out' is a reserved keyword, so I changed that in both my vertex shader and fragment shader.  Thanks for that, I feel stupid now.

 

Now the shader compiles correctly, however:

 

 

cgD3D11LoadProgram(vs, flags);
setVertexLayout(vs);  // vs is still null even after being set by cgCreateProgramFromFile

 

 

What would be causing this?  My log shows that both cgCreateProgramFromFile and cgD3D11LoadProgram were successful (that is, calling cgGetLastErrorString returns CG_NO_ERROR).


#2jburke4126

Posted 21 December 2012 - 10:30 AM

Yes, 'out' is a reserved keyword, so I changed that in both my vertex shader and fragment shader.  Thanks for that, I feel stupid now.

 

Now the shader compiles correctly, however:

 

 

cgD3D11LoadProgram(vs, flags);
setVertexLayout(vs);  // vs is still null even after being set by cgCreateProgramFromFile aboveauto:0

 

 

What would be causing this?  My log shows that both cgCreateProgramFromFile and cgD3D11LoadProgram were successful (that is, calling cgGetLastErrorString returns CG_NO_ERROR).


#1jburke4126

Posted 21 December 2012 - 10:29 AM

Yes, 'out' is a reserved keyword, so I changed that in both my vertex shader and fragment shader.

 

Now the shader compiles correctly, however:

 

cgD3D11LoadProgram(vs, flags);
setVertexLayout(vs);  // vs is still null even after being set by cgCreateProgramFromFile above

 

What would be causing this?  My log shows that both cgCreateProgramFromFile and cgD3D11LoadProgram were successful (that is, calling cgGetLastErrorString returns CG_NO_ERROR).


PARTNERS