# CreateRenderImage

## Description

Creates a blank image suitable for rendering and returns an ID to reference it. This can be used with SetRenderToImage to draw things to images. You can create RGBA images for normal rendering or depth images for capturing the depth buffer on devices that support it. You can also choose to use mipmapping on this image or not, this overrides the global SetGenerateMipmaps() command for this image only, this is because mipmaps on rendered images can be a performance hit so it should not be used unless necessary. Mipmaps should only be necessary if you intend to use this image to texture objects in your scene, if you are only using this image for full screen shaders you should not use mipmapping on it.

## Definition

integer CreateRenderImage( width, height, format, mipmap )

UINT agk::CreateRenderImage( UINT width, UINT height, UINT format, UINT mipmap )

CreateRenderImage( imageID, width, height, format, mipmap )

void agk::CreateRenderImage( UINT imageID, UINT width, UINT height, UINT format, UINT mipmap )

## Parameters

- width - The width of the image to create
- height - The height of the image to create
- format - 0=RGBA (32bit), 1=Depth
- mipmap - 1 to use mipmapping on this image, 0 to turn it off
- imageID - The image ID to use for this image