Skip to main content
gamedev.net
🔒 Locked

Error using CgFX

Started by DanielH Jun 29, 2007 at 1:45 PM 0 replies 950+ views
Original Post
DanielH
DanielH
Hello, I've been trying to use CgFX in my game but I get this message printed in my debugger each rendered frame

cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))

... And so on ...


The pixel shader works but not the vertex shader. This is how my cgfx file looks like

float4x4 ModelViewProj : WorldViewProjection;

void main_vs(
		in float3 position		: POSITION,
		in float2 texCoord		: TEXCOORD0,
		
		out float4 oPosition		: POSITION,

		uniform float4x4 worldViewProj)
{
	oPosition = mul(worldViewProj, float4(position, 1));
}


float4 main_ps(
		in float2 texCoord		: TEXCOORD0
		) : COLOR
{
	return float4(1,0,1,1);
}


technique test 
{
	pass 
	{
		VertexShader = compile vs_1_1 main_vs(ModelViewProj);
		PixelShader = compile ps_1_3 main_ps();
	}
}



It seems odd to me that the error message said there was trouble using "cgD3D8LoadProgram", when I'm using the cgD3D9 library. I have checked my code using CG API calls and it's identical to the code I find in the bumpmap example that comes bundled with the SDK.
DanielH
DanielH
I've been debugging this for three days now without any progress. I've searched the net but I can't find anyone who have gotten the same error message as I have.

Could this have anything with my old graphics card to do? Still running an old GeForce 4 Ti 4200.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.