jaquadro / LilyPath

A 2D path and shape drawing library for MonoGame and XNA.
MIT License
93 stars 12 forks source link

Smoothed #7

Open RogerGMartins opened 10 years ago

RogerGMartins commented 10 years ago

Hello mate, how can one smooth? http://imgur.com/kZTC5sK

should I just increase the subdivisions? I tried to use : GL.Enable(EnableCap.LineSmooth); (opentk/monogame) didn't work, i'm sure there is some state maintaining mechanism in lily, but I didn't look much further.

Thanks, Roger.

jaquadro commented 10 years ago

As I commented in the MonoGame thread, it's that MonoGame doesn't support MSAA for OpenGL like XNA did. The rendered image on the project readme was taken in XNA.

If I finish updating UV handling to match what I'm doing with Color, then at least for line drawing it should be possible to hack around the lack of MSAA.

RogerGMartins commented 10 years ago

oh god, shame.

I will investigate MSAA a bit more, maybe i will be able to figure it out next week. Opentk scares me though.

RogerGMartins commented 10 years ago

Hi, well i'm using OTK GLControl so I just used : base(new GraphicsMode(32, 24, 8, 8))

for normal monogame you will need to hack a bit more and change the gamewindow that opentk creates

http://www.opentk.com/book/export/html/140 more info here.

this wont help me though : (, i'm in a VM and the client will be too, and it doesn't have sampling implemented.

edit: pic with result http://imgur.com/jvhXio4

jaquadro commented 10 years ago

The results look nice, but I don't fully understand why you can't use this approach. Are you saying you can't use a modified MonoGame, or that your environment just won't support any OpenGL sampling?

RogerGMartins commented 10 years ago

i have to use a virtual machine. it uses mesa`s software opengl implementation.

no sampling suport in this version.

i just dont know why monogame does not have the sampling implemented for ogl. looks easy No dia 24 de Fev de 2014 15:45, "Justin Aquadro" notifications@github.com escreveu:

The results look nice, but I don't fully understand why you can't use this approach. Are you saying you can't use a modified MonoGame, or that your environment just won't support any OpenGL sampling?

Reply to this email directly or view it on GitHubhttps://github.com/jaquadro/LilyPath/issues/7#issuecomment-35892402 .

jaquadro commented 10 years ago

I tried looking at the history of AA in MonoGame's issues. https://github.com/mono/MonoGame/issues/358 OpenGL comes up near the bottom. It looks like no one has looked into it much (lack of interest?).

In these cases it's basically up to the community to submit PRs to add the features. There's also the question does this require changes in other areas like rendertargets.

RogerGMartins commented 10 years ago

It will probably require changes in render targets, but it looks like it depends of the types of surfaces required.

~~Well, i'm off to finish writing a multi glcontrol control, with shared content (contmanager.cs hacking). Managing the control in threads will be a pain,~~ but oh well, its life, so i will look into the other subject after i finish that. Maybe submit a pr for 3D space paths, since i will probably need it.