Custom Point GLSL shader via HDK Primitive Render Hook

   635   0   0
User Avatar
Member
8 posts
Joined: 7月 2022
Offline
Dear,

I would like to have custom shading for the point primitive in the viewport. I tried `Houdini 19.5.435\toolkit\samples\GUI\GUI_PrimFramework.C`. It has `#define DESIRED_PRIM_TYPE GA_PRIMNONE` defined. So I guess it is set for point primitive. The sample code successfully build and the app launched. But I don't see any effect. Also, the `std::cerr << "Create new hook" << std::endl;` in `GUI_PrimFrameworkHook::createPrimitive` is not invoked. I wonder how can I achieve this? Any help is much appreciated.

PS: I tried the `Houdini 19.5.435\toolkit\samples\GUI\GUI_PolySoupBox` example as well. It builds well but I don't know how I can see the effect. The `Houdini 19.5.435\toolkit\samples\tetprim` worked quite well. But I want to change the default point's shading rather than develop a new primitive.

PSS: If I change the `#define DESIRED_PRIM_TYPE GA_PRIMNONE` to `GA_PRIMPOLY`. It builds. But when I create a polyline, the app crashed.

Thanks,
Roden
  • Quick Links