General Category > Discussion - EVE

Reproducing the demo outline circle in the screen editor

(1/1)

obones:
In the SampleApp, there is set_07 that displays only the outline of a circle by means of multiple points drawn with different blending functions.

I'm now trying to use this kind of effect in my own system and it does not work at all, nothing is displayed.

I thus went to the EVE Screen Editor application and tried to reproduce ConcentricCircles from set_07 with the following coprocessor list:


CMD_DLSTART()
VERTEX_FORMAT(0)
CLEAR_COLOR_RGB(255, 255, 255)
CLEAR(1, 1, 1)

BEGIN(LINES)
LINE_WIDTH(16)
COLOR_RGB(0x0, 0xFF, 0xFF)
VERTEX2F(200, 200)
VERTEX2F(400, 400)
END()

CLEAR_COLOR_A(0)

BEGIN(POINTS)

COLOR_MASK(0, 0, 0, 1)
BLEND_FUNC(ONE, ONE_MINUS_SRC_ALPHA)

POINT_SIZE(1600)
VERTEX2F(300,300)

BLEND_FUNC(ZERO, ONE_MINUS_SRC_ALPHA)

POINT_SIZE(1400)
VERTEX2F(300, 300)

COLOR_MASK(1, 1, 1, 0)
BLEND_FUNC(DST_ALPHA, ONE)

COLOR_RGB(0, 255, 0)
POINT_SIZE(1800)
VERTEX2F(300, 300)

BLEND_FUNC(SRC_ALPHA, ONE_MINUS_SRC_ALPHA)

END()


I was expecting this to give me a diagonal blue line with a green circle outline drawn on top of it.
But all I get is the blue line, nothing else.

What have I missed?

BRT Community:
Hello,

Thank you for your question, would you be able to provide an example of what you are trying to draw on the screen for reference?

Best Regards,
BRT Community

obones:
Hello,

In the demo, there is this rendering:



I'm trying to replicate it, to get a green circle outline on top of a blue line, like this:



But with the given set of commands, all I'm getting is the line by itself:



Clearly, I have missed something, but I can't figure out what.

BRT Community:
Hello,

The following code will draw the desired circle with the line through it,


--- Code: ---BEGIN(LINES)
LINE_WIDTH(48)
COLOR_RGB(0x0, 0xFF, 0xFF)
VERTEX2F(1688, 1384)
VERTEX2F(4768, 5056)
END()

BEGIN(POINTS)


CLEAR_COLOR_A(0)
COLOR_MASK(0, 0, 0, 1)

BLEND_FUNC(ONE, ONE_MINUS_SRC_ALPHA)
POINT_SIZE(1600)
VERTEX2F(3200, 3200)

BLEND_FUNC(ZERO, ONE_MINUS_SRC_ALPHA)
POINT_SIZE(1520)
VERTEX2F(3200, 3200)

COLOR_MASK(1, 1, 1, 0)

BLEND_FUNC(DST_ALPHA, ONE)
COLOR_RGB(3, 182, 0)
POINT_SIZE(1600)
VERTEX2F(3200, 3200)
BLEND_FUNC(SRC_ALPHA, ONE_MINUS_SRC_ALPHA)

END()

--- End code ---

However after some investigation it appears as if the CLEAR_COLOR_RGB command is causing the behaviour you are seeing where the circle isn't being drawn. For example if you alter this to black or red the circle is drawn correctly. I believe this sample was designed only to utilise a black background, but I will confirm this with the development team, and in the meantime investigate a solution to this issue.

Best Regards,
BRT Community

Navigation

[0] Message Index

Go to full version