Custom vertex shader with offscreen rendering

Problems building or running the engine, queries about how to use features etc.
Post Reply
dima5
Gnoblar
Posts: 2
Joined: Fri Nov 30, 2018 11:28 pm

Custom vertex shader with offscreen rendering

Post by dima5 » Fri Nov 30, 2018 11:34 pm

Ogre Version: :?: 1.9
Operating System: :?: Linux/X11
Render System: :?: OpenGL

Hi. I'm trying to use ogre to render off-screen with a custom GLSL vertex shader. I have the off-screen rendering part working. As far as I can tell, to add a custom shared I'm supposed to viewport->getCamera()->getTechnique()->getPass(0)->setVertexProgram(...). But in my case the getTechnique() returns NULL. Am I supposed to create some default technique? How? Are there samples anywhere that demo any of this? Thanks.
0 x


dima5
Gnoblar
Posts: 2
Joined: Fri Nov 30, 2018 11:28 pm

Re: Custom vertex shader with offscreen rendering

Post by dima5 » Sat Dec 01, 2018 3:22 am

Thanks for the reply. That page is interesting, but doesn't entirely tell me what I'd like to know. I have a Camera and a Viewport. There is no associated Technique, but something is being rendered successfully anyway. Do I need to create a Technique? How? The Material class has a createTechnique(), but I can't call it because camera.getMaterial() gives me a const Material. Pointers appreciated.

Thanks.
0 x

Post Reply