user1368198
user1368198

Reputation:

How can i use my custom shader in Linderdaum Engine scene?

Currently I replace default.sp with my custom shader and it works fine. But this shader is applied to all objects in the scene.

Scene->SetMtl() works only with materials and not OpenGL shaders.

How can I use my custom shader only for some objects?

Upvotes: 1

Views: 104

Answers (1)

user2563840
user2563840

Reputation:

There is a method clScene::SetMtlFromShader() which accepts three clRenderState variables. One for each pass: normal, shadow and reflection.

You need to create your own clRenderState and set the OpenGL shader program to it using clRenderState::SetShaderProgram() method. It should work fine.

Upvotes: 1

Related Questions