Issues with MHWRender::MPxShaderOverride::drawGeometry()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am calling MPxShaderOverride::drawGeometry() to render my objects from my shader override on Maya 2022 (Mac). I am internally generating GLSL shaders which I use for rendering.
The problem is that Maya seems to properly bind the Vertex and Normal vertex buffers to my GLSL 1.5 core shader, but I am not able to get the texture coordinates bound properly. The geometry requirements are properly set up during initialization.
I was able to get them properly bound to my shader if I write the binding / drawing OpenGL code (instead of using MPxShaderOverride::drawGeometry()). However, this increases the complexity of my code and I'd prefer not to do this manually.
So the questions are:
- Why is Maya properly binding the Vertex / Normal streams (and not the texture coordinates) ?
- Is there any limitation of MPxShaderOverride::drawGeometry() which makes you write your own code to handle this?
- How does Maya decide how to bind the vertex streams to my custom GLSL 1.5 core shader without me explicitly setting the stream locations?
Cheers.