mathieu Posted October 28, 2008 Share Posted October 28, 2008 Is it possible to declare an array as global in VEX ? I would like to use fixed values in my arrays for computing in subfunctions. I have tried to do that like in C but it seems to not work . global vector a[]={{1,1,1},...,{1,0,10}} vector (){ return a[1]; } Mathieu Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted October 28, 2008 Share Posted October 28, 2008 No, you can't declare global data in VEX -- that is, not global in the sense that it can be accessed by different VEX functions (shaders, sops, whatever) with a lifespan of a Mantra frame or a Houdini session. However, you can create such a beast as a VEX DSO (data plus access functions). See the $HT/include/VEX/VEX_VexOp.h header for the API to this. HTH. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.