How to setMaterial to simplerenderable
Posted: Wed Nov 28, 2018 2:04 pm
Ogre Version: 1.11
Operating System: Ubuntu
Render System: GLRenderSystem
I created a SimpleRenderable, which contains 2 points for a line, whose render op type is OT_LINE_LIST.
And I setMaterial to it to the following simple material:
And I created vertex buffer and color buffer for it in fillHardwareBuffers().
But the rendered line's color is black.
What steps do I need to do in order to let the material be used by the rendering?
Operating System: Ubuntu
Render System: GLRenderSystem
I created a SimpleRenderable, which contains 2 points for a line, whose render op type is OT_LINE_LIST.
And I setMaterial to it to the following simple material:
Code: Select all
material Green
{
technique
{
pass ambient
{
ambient 0 1 0
diffuse 0 1 0
specular 0.1 0.1 0.1 1 1
}
}
}
But the rendered line's color is black.
What steps do I need to do in order to let the material be used by the rendering?