I'm trying to set polygon mode to wireframe in my JSON hlms file, and I can see that my renderable's datablock has PM_WIREFRAME set, but my renderable still renders as a solid object.
From my findings (or lack of it actually) it seems that wireframe mode isn't implemented for Metal. Is that correct? I wanted to try to fix it but I'm unsure of how complicated it would be or if there are any rabbit holes to look out for?
Running Ogre 2.1 on macos sierra on a 2012 mac book air.
Polygon mode wireframe missing for Metal render system?
-
mrmclovin
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
-
dark_sylinc
- OGRE Team Member

- Posts: 5561
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1403
Re: Polygon mode wireframe missing for Metal render system?
It appears to be an oversight.
I think calling:
inside MetalRenderSystem::_setPipelineStateObject may just do it.
If that works, we should cache "fillMode" in MetalHlmsPso (in MetalRenderSystem::_hlmsPipelineStateObjectCreated) instead of evaluating the comparison on every _setPipelineStateObject call as a performance optimization.
I think calling:
Code: Select all
MTLTriangleFillMode fillMode = pso->macroblock->mPolygonMode == PM_SOLID ?
MTLTriangleFillModeFill : MTLTriangleFillModeLines;
[mActiveRenderEncoder setTriangleFillMode:fillMode];If that works, we should cache "fillMode" in MetalHlmsPso (in MetalRenderSystem::_hlmsPipelineStateObjectCreated) instead of evaluating the comparison on every _setPipelineStateObject call as a performance optimization.
-
mrmclovin
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
Re: Polygon mode wireframe missing for Metal render system?
Thank you!
It worked!
It worked!