I am trying to write some data to the viewport using 'GL_ViewportFont' class. I declared its object and RE_Render object:
GR_ViewportFont *data = new GR_ViewportFont;
RE_Render *ren = new RE_Render(0,"viewport");
I am calling data->int label (RE_Render *r, const UT_String &str, const UT_Vector3F &pos, const UT_Vector3F &col, fpreal32 *&dst_points, fpreal32 *&dst_texcoord, fpreal32 *&dst_colors, XPosition xpos, YPosition ypos, fpreal &x_offset) const
by passing some constants to this function. As soon as I run Houdini it crashes on this function call. I am creating a SOP node and calling this function from within the cookMySop method.
1. Should I be calling this from cookMy Sop?
2. Am I defining RE_Render incorrectly?
Since Houdini does not print out any error on crashing I have no idea where I am going wrong.
Does anyone know about this or any other alternate solution ?