TODO: this could've been achieved with templates, bv_type vec_type, u8 components
| 95 | |
| 96 | // TODO: this could've been achieved with templates, bv_type vec_type, u8 components |
| 97 | bv_variable create_float3(bv_program* prog, glm::vec3 val) |
| 98 | { |
| 99 | bv_variable ret = bv_variable_create_object(bv_program_get_object_info(prog, isGLSL(prog) ? "vec3" : "float3")); |
| 100 | bv_object* retObj = bv_variable_get_object(ret); |
| 101 | |
| 102 | bv_object_set_property(retObj, "x", bv_variable_create_float(val.x)); |
| 103 | bv_object_set_property(retObj, "y", bv_variable_create_float(val.y)); |
| 104 | bv_object_set_property(retObj, "z", bv_variable_create_float(val.z)); |
| 105 | |
| 106 | return ret; |
| 107 | } |
| 108 | bv_variable create_int3(bv_program* prog, glm::ivec3 val) |
| 109 | { |
| 110 | bv_variable ret = bv_variable_create_object(bv_program_get_object_info(prog, isGLSL(prog) ? "ivec3" : "int3")); |
no test coverage detected