Allocate texture
Allocate texture
Allocate texture
Allocate texture
Allocate texture
Allocate texture
Begin to bind the texture.
End to bind the texture.
Return gl texture id.
Return pixel of texture
Set pixel of texture
Resize texture.
Return the texture size.
auto texture = new Texture; texture.allocate(256, 256); auto rect = new Mesh; rect.primitiveMode = PrimitiveMode.Quads; texture.begin; rect.addTexCoord(0, 1);rect.addVertex(0, 0, 0); rect.addTexCoord(0, 0);rect.addVertex(0, 1, 0); rect.addTexCoord(1, 0);rect.addVertex(1, 1, 0); rect.addTexCoord(1, 1);rect.addVertex(1, 0, 0); texture.end; rect.addIndex(0); rect.addIndex(1); rect.addIndex(2); rect.addIndex(3); texture.begin; rect.drawFill(); texture.end;
openGLのtextureを表すクラスです. 初期化後,allocateして利用します.