NewTexture2DFromRGBA creates a new texture from a pointer to an RGBA image object.
(rgba *image.RGBA)
| 96 | |
| 97 | // NewTexture2DFromRGBA creates a new texture from a pointer to an RGBA image object. |
| 98 | func NewTexture2DFromRGBA(rgba *image.RGBA) *Texture2D { |
| 99 | |
| 100 | t := newTexture2D() |
| 101 | t.SetFromRGBA(rgba) |
| 102 | return t |
| 103 | } |
| 104 | |
| 105 | // NewTexture2DFromData creates a new texture from data |
| 106 | func NewTexture2DFromData(width, height int, format int, formatType, iformat int, data interface{}) *Texture2D { |
no test coverage detected