3 Replies Latest reply on Feb 26, 2009 4:01 PM by rick.weber

    CAL types

    thesquiff

      When should I be using CALint? The examples and documentation seem a bit inconsistent, sometimes using CALint and sometimes using int. What is the difference?

       

      Also does CAL have vector types, like the float4 available in Brook+?

       

      Thanks

        • CAL types
          rick.weber

          CALint is typedefed to int. In general, whenever using the CAL API, I would use CALint, so that if its type changes for some reason in the future, your code won't break.

          Edit: Yes, it has vector types. When you allocate the resource, you tell it what type of resource it is (i.e. CAL_FORMAT_FLOAT_4 is the same as float4). CAL doesn't have float3s but you can emulate these using float4s.