Draw single pixel using DrawNode

Hi, I’m in a little trouble.

For testing purposes I wanted to fill drawNode with single color. The color is 255, 0, 0, 127 (which is around 1.0f, 0.0f, 0.0f, 0.5f).

In general it’d need this to use flood fill, but I also want it for a lot more.

But the problem is I don’t know, which function I should use to draw a single pixel.

drawNode->drawDot(Vec2(x, y), 1, color);
gives:

drawNode->drawLine(Vec2(x, y), Vec2(x + 1, y + 1), color);
gives:

Ofc it’s wrong, but I just wanted to use everything I could :slight_smile:

drawNode->drawPoint(Vec2(x, y), 1, color);
gives:

drawNode->drawSolidRect(Vec2(0, 0), Vec2(img->getWidth(), img->getHeight()), Color4F(1.0f, 0.0f, 0.0f, 0.5f));
gives:

Last image is the right output. But ofc I want to draw pixel by pixel.

I just made another test comparing drawDot and drawPoint:

Zoom in to see better.

On the left: drawPoint
On the right: drawDot

So drawDot is no use for me - I just checked source code and it’s drawing triangles. That’s why it’s working like this.
But drawPoint should do the job (it’s however deprecated) as for 1 pixel it’s ok. On the bigger area it’s acting strange (third image). Color is ok but mysterious grid appears out of nowhere.

Why?

I wonder if there’s another method to directly access drawed pixels (of drawnode for example).