I'm trying to make a simple plugin. I want to design simple geometric shape. But I don't understand how I can create the drawGL function.
I can draw on canvas with instance.draw but I don't know I can do the same with drawGL. If I use gwl.quad I have only a black rectangle. And I can't set the color.
instanceProto.draw = function (ctx) {
var myx = this.x;
var myy = this.y;
var w = this.width;
var h = this.height;
ctx.fillStyle = "blue";
ctx.fillRect(myx, myy, w, h);
};
instanceProto.drawGL = function (glw) {
};
[/code:2h5eova9]
There is not information in C3 manual ([url=https://www.construct.net/it/make-games/manuals/addon-sdk/search?q=drawGL]link[/url]). The same in C2 manual ([url=https://www.scirra.com/manual/search?q=drawGL]link 1[/url], [url=https://www.scirra.com/manual/23/runtime-functions]link 2[/url]).