Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Pure virtual function error as using the geometry shader

$
0
0

I want to render silhouettes edges using the geometry shader. First I create an index buffer (with adjacent indices) and a vertex buffer then render. For testing, the geometry shader just pass an input triangle to the pixel shader. The input triangle is at 0, 2, 4 indices.

struct VS_OUTPUT
{
   float4 posH: SV_POSITION;
};

struct GS_OUTPUT
{
   float4 posH: SV_POSITION;
};

void Silhouette_Edges_GS(triangleadj VS_OUTPUT input[6], inout TriangleStream<GS_OUTPUT> output)
{
	GSOutput v[3];
	for (uint i = 0; i < 3; i++)
	{
		v[i].posH = input[i].posH;
		output.Append(v[i]);
	}

	output.RestartStrip();
}

I got an "pure virtual function call" error message as running. Please, help me. 


Viewing all articles
Browse latest Browse all 17560

Latest Images

Trending Articles



Latest Images