| 1246 | return Common::create_float4(prog); |
| 1247 | } |
| 1248 | bv_variable lib_glsl_textureQueryLevels(bv_program* prog, u8 count, bv_variable* args) |
| 1249 | { |
| 1250 | if (count >= 1) { |
| 1251 | if (args[0].type == bv_type_object) { // floor(vec3), ... |
| 1252 | bv_object* sampler = bv_variable_get_object(args[0]); |
| 1253 | |
| 1254 | // gsampler1D/2D/3D |
| 1255 | if (IsBasicTexture(sampler->type->name)) { |
| 1256 | Texture* tex = (Texture*)sampler->user_data; |
| 1257 | return bv_variable_create_int(tex->MipmapLevels); |
| 1258 | } |
| 1259 | /* else if samplerCube ... */ |
| 1260 | } |
| 1261 | } |
| 1262 | |
| 1263 | return bv_variable_create_int(0); |
| 1264 | } |
| 1265 | bv_variable lib_glsl_textureQueryLod(bv_program* prog, u8 count, bv_variable* args) |
| 1266 | { |
| 1267 | /* TODO */ |
nothing calls this directly
no test coverage detected