Wraps an existing GL_TEXTURE_2D texture object as a Texture2D.
This can be used for integrating Cogl with software using OpenGL directly.
The texture is still configurable until it has been allocated so for example you can declare whether the texture is premultiplied with set_premultiplied.
<note>The results are undefined for passing an invalid gl_handle
or if width
or height
don't
have the correct texture geometry.</note>
ctx |
A Context |
gl_handle |
A GL handle for a GL_TEXTURE_2D texture object |
width |
Width of the foreign GL texture |
height |
Height of the foreign GL texture |
format |
The format of the texture |
A newly allocated Texture2D |