Adding OpenGL Shaders


#1

Hello,

I want to add a new DisplayPipeline to draw my own geometry, How can I create the new DisplayPipeline with a new OpenGl Shader? How can I use CRhinoGLExtensions?
I’m using the c++ sdk.

Thank you,


(Steve Baer) #2

Could you provide a little more information about what it is that you are trying to do? I’m not sure custom shaders is the correct approach unless I know exactly what you are trying to achieve.


#3

I have my own geometry which is not an OpenNurbs object. I want to draw my geometry in the Rhino viewport. My geometry could be really big and change really fast. I think the best way is use OpenGL.


(Steve Baer) #4

I wouldn’t recommend creating a new DisplayPipeline for this. If you have a custom object or a display conduit, you can place your custom drawing code in there. The custom drawing code could include OpenGL calls since the HGLRC will be active. Please make sure to test that you are actually in an OpenGL based engine when performing your drawing code because there are cases where the pipeline is using a GDI based engine (typically for vector printing.)