Plugin Dev Bug (renderer.Fill)

0 favourites
  • 3 posts
From the Asset Store
An educational game for Fill in the Blanks. An easy to use template for developers to build larger games
  • I have found what seems to be a bug with renderer.Fill when i used a fill for a plugin where i wanted a simple visual placeholder.

    With the Edittime if you have a plugin where you have this -

    IDEInstance.prototype.Draw = function(renderer)

    {

        renderer.Fill(this.instance.GetBoundingQuad(), cr.RGB(100, 100, 255)) // Currently has a bug

    }

    If you have that in the plugin and then start a new project and add the plugin you see the blue fill working correctly. However if you create a sprite with a image then add other copies of the plugin with this it will then use the texture from the sprite mixing it with the fill color.

    So it seems for some reason it is getting sent the texture from other quads even when something is not using them.

    I did some testing with other things and Outline and Line seem to do a very similar thing where they appear darker. Outline also has another bug where it seems to have a pixel missing on the lower left side.

    I have a request also, it would be useful to have a extra , available for renderer.Fill etc to set a alpha value. I can't seem to find a way to set a alpha value for them so i think that would be a nice solution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Closing as not a bug: this is by design. If you wish to fill a rectangle with no texture, you must first set the texture to a null texture.

  • Thanks for the info, i tried doing as you say however exactly the same thing happens again when i update the code.

    IDEInstance.prototype.Draw = function(renderer)

    {

        renderer.SetTexture(null);

        renderer.Fill(this.instance.GetBoundingQuad(), cr.RGB(100, 100, 255)) // Currently has a bug

    }

    I originally did not use the texture flag as i found it automatically opened the image editor but i tested adding that and it unfortunately it did not make much difference either.

    I have had the fill working from the start but it's always inheriting the Sprite objects image whatever i try. I am guessing i have done something wrong still, do you have a simple code snippet if possible? thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)