Jump to content

global arrays


mathieu

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...