Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have different Shaders and for each Shader a instance of the ShaderClass class, which initializes the Shaders, Renders the Shaders, etc.

I use most of the Shaderclasses without Geometry Shader, but in one Shader Class i also use a Geometry Shader.

The problem is, that when I render one object with the Shaderclass that uses the Geometry shader, all other object are rendered with the same geometry that I create in the Geometry Shader. Can you help me?

Is it possible that I have to use a Geometry Shader for each object, when I use one for one object?

I use DirectX 11 with C++.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

After using the geometry shader, you'll need to do GSSetShader(NULL, NULL, 0) to disable it. Otherwise the geometry shader will remain active during all rendering afterward.

If you use DX11 tessellation shaders (hull & domain shaders) you'll similarly need to set them to NULL when you don't want tessellation anymore.

share|improve this answer
    
ok thanks a lot..that works :) –  CmasterG Jun 26 '13 at 17:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.