---
title: cp_drawable_get_texture_count
framework: compositorservices
role: symbol
role_heading: Function
path: compositorservices/cp_drawable_get_texture_count
---

# cp_drawable_get_texture_count

Returns the number of color and depth textures available in the drawable.

## Declaration

```occ
size_t cp_drawable_get_texture_count(cp_drawable_t drawable);
```

## Parameters

- `drawable`: The drawable for a frame.

## Return Value

Return Value The number of textures available for drawing. For example, a return value of 2 indicates there are two color textures and two depth textures available.

## Discussion

Discussion Use the returned value as the maximum number of textures to retrieve from the cp_drawable_get_color_texture or cp_drawable_get_depth_texture functions.

## See Also

### Getting the render textures

- [cp_drawable_get_depth_texture](compositorservices/cp_drawable_get_depth_texture.md)
- [cp_drawable_get_color_texture](compositorservices/cp_drawable_get_color_texture.md)
