I have a custom component which derives from
RenderableComponent, very similar to the
RenderableCopyMeshComponent in the
No compiler or runtime errors happen, but the meshes I’m creating internally (I do a number of calls to
init and add these to a vector) are never drawn.
What’s more curious is that if I place a breakpoint in my
virtual void update(double deltaTime) override; method then it is definitely called, but if I place a breakpoint in my
onDraw method, it is never called. (My method is defined as
protected: virtual void onDraw(const glm::mat4& viewMatrix, const glm::mat4& projectionMatrix) override;
I’m assuming that the render service thinks there is nothing to render here? In the documentation for
RenderableComponentInstance.ondraw(), it states:
This method won’t be called if the mesh isn’t visible!
What defines “visible” here, though? I have a vector of
RenderableMesh instances that are ready to go! The component is added to the scene and my main application is not picky about which RenderableComponents should get rendered.
Any ideas why the render service would not even try to call my