Surface_create - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

NOTOC {{-}}

Notation

Description

Creates a surface (dynamic texture) and returns its id which can be called in drawing and accessing the created surface. Has two arguments, width and height, which specify the size of the surface. Usually they are automatically converted to power of two, because older GPU's can't handle non power of two textures.

Implementation in OpenGL probably uses FBO and so won't work on older intel cards, but there isn't an alternative and so those cards can live without surfaces. Just make this optional so if a project doesn't use surfaces then it can still run on intel cards.

Parameters

  • List parameters with a description of each.

Return Values

Document return values.

Example Call

Example of using the function.