These are chat archives for AvaloniaUI/Avalonia

13th
Nov 2015
Weston
@ronnyek
Nov 13 2015 00:20
wonder if the direct2d varies in performance from skia
Nikita Tsukanov
@kekekeks
Nov 13 2015 00:20
Well, create some benchmark code and test
Weston
@ronnyek
Nov 13 2015 00:22
I dont know for sure, but I suspect I wouldnt even be able to get a functional skia build
I had a lot of problems with it =)
Nikita Tsukanov
@kekekeks
Nov 13 2015 00:23
Run src/Skia/getbinaries.ps1
It will download latest native binaries
Weston
@ronnyek
Nov 13 2015 00:23
nice
Steven Kirk
@grokys
Nov 13 2015 08:57
it would be nice to use a single backend for everything, but i suspect it won't happen because 1) for skia you need to distribute a native binary for the platform which could be a problem for some 2) performance effects are unknown 3) native integration, e.g. Direct3D is more easily achieved if you have a native renderer
we have had people asking about integrating perspex in games etc, for which i suspect skia would't be acceptable
Nikita Tsukanov
@kekekeks
Nov 13 2015 12:09
Nobody writes games using Direct2D
Egor Bogatov
@EgorBo
Nov 13 2015 13:13
challenge accepted!
btw, it's not so easy but possble to distribute native binaries via nuget
Nikita Tsukanov
@kekekeks
Nov 13 2015 13:16
Ehm
We already have Perspex.Skia nuget package with native binaries included
Check nightly nuget feed
Egor Bogatov
@EgorBo
Nov 13 2015 13:17
oh, intersting how you managed to do it
Nikita Tsukanov
@kekekeks
Nov 13 2015 13:17
And it can't possibly be larger than SharpDX nuget (which is 400MB)
Egor Bogatov
@EgorBo
Nov 13 2015 13:18
nice! I use "targets" too for that
I though you might use PS for it
Nikita Tsukanov
@kekekeks
Nov 13 2015 13:19
Using PS in packages is evil
Egor Bogatov
@EgorBo
Nov 13 2015 13:19
... and won't work in Xamarin Studio
Nikita Tsukanov
@kekekeks
Nov 13 2015 13:21
I thought MonoDevelop was using PaSH
BTW are there any plans of replacing xbuild with msbuild?
Friedrich von Never
@ForNeVeR
Nov 13 2015 14:19
There was a plugin from one of the Pash contributors, but I don't think that either the Pash or the plugin has been reached the production quality.
Steven Kirk
@grokys
Nov 13 2015 15:36
Nobody writes games using Direct2D
not sure if you were being flippant, but i said Direct3D
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:37
There won't be issues with skia then
Since ultimately it uses Direct3D using ANGLE
Steven Kirk
@grokys
Nov 13 2015 15:37
you can intermix the two?
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:37
well, why not?
Steven Kirk
@grokys
Nov 13 2015 15:37
i didn't know that
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:38
BTW, you can always draw to bitmap
Steven Kirk
@grokys
Nov 13 2015 15:38
yeah, but a game engine will probably want to render directly
we'd have to hear from someone who works on that sort of thing though
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:38
it will be a bit problematic anyway
And not even portable, you know
If one is developing a game using OpenGL, using skia will be completely fine
Since it's designed to render to OpenGL's FBO
Steven Kirk
@grokys
Nov 13 2015 15:39
i think more games are developed using Direct3D, though that's lessening
as most engines are cross-platform these days
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:40
Direct3D isn't xplat, you know
And MonoGame can use ANGLE on windows
Steven Kirk
@grokys
Nov 13 2015 15:41
no, i didn't know that
/sarcasm
Perspex/Perspex#6
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:41
So skia is completely compatible with MonoGame
Regarding 3D widget - we can also implement that using SKIA backend
With MESA for SW rendering
Steven Kirk
@grokys
Nov 13 2015 15:43
one of the apps i have written embeds a 3D scene, drawn using Direct3D into a WPF app
it's not ideal as you can't draw directly to the window using WPF
lots of people complain about the framerate when doing so
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:44
With WPF you are probably creating some native window
and render your stuff there
Steven Kirk
@grokys
Nov 13 2015 15:44
no, it uses D3DImage
with using a native window you have airspace issues
and i need to draw WPF controls on top of the scene (handles etc)
i think it's a reasonably common need
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:45
Yep, but that's not portable at all
Denis Zaporozhets
@QuantumDeveloper
Nov 13 2015 15:45
this is impossible in WPF
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:45
And if people need windows only, they can use wpf
Denis Zaporozhets
@QuantumDeveloper
Nov 13 2015 15:46
you need to create your own WPF to do that)))
Steven Kirk
@grokys
Nov 13 2015 15:46
so Perspex is only for x-plat now?
Denis Zaporozhets
@QuantumDeveloper
Nov 13 2015 15:46
or use UWP
Steven Kirk
@grokys
Nov 13 2015 15:46
i didn't realise
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:46
Well, I thought that was the point of using PCLs and stuff
Steven Kirk
@grokys
Nov 13 2015 15:46
saying "you can be cross platform" is very different from saying "you must be cross platform"
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:47
There isn't anything non-portable in the current code base
Steven Kirk
@grokys
Nov 13 2015 15:47
yep, so you can be cross platform
you don't have to be cross-platform in you app that uses perspex though
there's nothing wrong with writing a windows app with perspex
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:48
Which won't even run on WinXP
Steven Kirk
@grokys
Nov 13 2015 15:49
in my case, we needed to target windows 7 and above
i suspect 90% of e.g. business apps target just that
what does skia use as a backend on xp?
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:51
Direct3D via ANGLE
If it's not available - sw rendering + SetDIBitsForDevice
If we need 3D even in cases where hw acceleration is unavailable, we can ship MESA's llvmpipe
Which will provide OpenGL rendering API
Steven Kirk
@grokys
Nov 13 2015 15:53
so you're thinking that a System.Drawing backend won't be needed any more?
Nikita Tsukanov
@kekekeks
Nov 13 2015 15:53
Yep
I need to compile angle using XP toolchain through
Or get pre-built binaries somewhere
I'll create a proof-of-concept of running perspex app on xp when I have some spare time (read: after iOS port)
Steven Kirk
@grokys
Nov 13 2015 15:56
yeah, it shouldn't be hard
Steven Kirk
@grokys
Nov 13 2015 16:10
ok, the name scope stuff has been merged into master
you can now bind to other controls, and do a foo = FindControl<TextBlock>("foo") after InitializeControls to get a reference to a named control
binding to another control works like in WPF {Binding Foo, ElementName=bar} or using #syntax: {Binding #bar.Foo}
Wiesław Šoltés
@wieslawsoltes
Nov 13 2015 16:13
CI build failed
Steven Kirk
@grokys
Nov 13 2015 16:16
grrr
forgot to push omnixaml
Wiesław Šoltés
@wieslawsoltes
Nov 13 2015 16:17

Perspex/Perspex#6

@grokys Maybe with this https://github.com/Microsoft/WPFDXInterop + SharpDX would be possible to embed Perspex is WPF :)

Steven Kirk
@grokys
Nov 13 2015 16:17
yeah, i will have to move my app over to that
Wiesław Šoltés
@wieslawsoltes
Nov 13 2015 16:29
@grokys <ContentControl Content="{Binding #tree.SelectedItem}"/> works great also with ElementName!
Steven Kirk
@grokys
Nov 13 2015 16:35
awesome!
Nikita Tsukanov
@kekekeks
Nov 13 2015 17:24
BTW, we are merging android support this weekend
I'll also add nuget package
@donandren did awesome work
Steven Kirk
@grokys
Nov 13 2015 17:24
excellent!
Nikita Tsukanov
@kekekeks
Nov 13 2015 17:25
I'm still struggling with compiling skia for iOS
Steven Kirk
@grokys
Nov 13 2015 17:25
we need to sort out touch support...
Nikita Tsukanov
@kekekeks
Nov 13 2015 17:25
Yep, for now it emulates mouse
which isn't a good thing
Andrey Kunchev
@donandren
Nov 13 2015 17:27
just a note, in order to work correctly with buttons with touch, i've generated fake mouse move event just before mouse down
otherwise the click event was not raised (only sometimes actually)
Nikita Tsukanov
@kekekeks
Nov 13 2015 17:31
@grokys we need our inspector to be network-based
it will be useless for mobile otherwise
Andrey Kunchev
@donandren
Nov 13 2015 17:35
and scrolling with touch is also emulated when touch is moving and generating MouseWheel events. This way vertical scoll with finger is working ok, but horizontal scroll is not working this way not sure why.
Steven Kirk
@grokys
Nov 13 2015 18:19
Yeah we need a proper touch event system
Inspector needs to do a lot of things!!
Nikita Tsukanov
@kekekeks
Nov 13 2015 19:41
Well, it seems that our iOS nuget package will be around 150MB
Oh, wait
That was only simulator arch
So that will be 450MB
or even 600
nnnice
Egor Bogatov
@EgorBo
Nov 13 2015 20:20
@kekekeks um, sorry I don't know about msbuild. but I noticed you use %(RecursiveDir)% in the *.targets file - have you checked it in XS?
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:21
Nope
It doesn't
Egor Bogatov
@EgorBo
Nov 13 2015 20:21
AFAIR, it won't work. I recently had to remove it from my targets
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:21
We should probably file an issue in xbuild or something
Egor Bogatov
@EgorBo
Nov 13 2015 20:22
I asked guys about it - they said it's too complicated
to implement
:(
PS: 600mb, wow! so enterprise :D
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:25
Xamarin.iOS requires static libs
And they are huge
Egor Bogatov
@EgorBo
Nov 13 2015 20:26
I use dylib for my ios project :)
I mean I compile my native code to dylib and then just add it to the project as a content
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:29
dylib is supported on iOS 8+
And I'm not sure that I'll even be able to complile that as dylib
It involved a lot of magic to do that for Linux/Android
Egor Bogatov
@EgorBo
Nov 13 2015 20:30
Mine too. It's a quite big 3d engine
for my case: dylib - 6mb, static lib (a) -- >100mb
per arch
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:33
Well, I won't be able to debug that on my device (which currently runs iOS7), so I'm stuck with static libs
Egor Bogatov
@EgorBo
Nov 13 2015 20:36
share of ios 7 is about 11% (among ios devices)
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:36
But I'm not updating mine :P
Why are you guys always trying to drop support for something?
Egor Bogatov
@EgorBo
Nov 13 2015 20:37
Don't be JAVA, drop old shit! :smile:
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:38
One of my apps still runs on .NET 2.0
Egor Bogatov
@EgorBo
Nov 13 2015 20:39
let me guess - Perspex supports Android 2.3! :P
Nikita Tsukanov
@kekekeks
Nov 13 2015 20:39
Hm
Not sure about that
Let me check
Native binaries are built using API_14 toolchain
I guess that's because of OpenGL ES 2.0
Well, we can try to build it using 2.3 toolchain
ANativeWindow is available, OpenGL ES 2.0 is available
I don't see why shouldn't we support that
hacklex
@hacklex
Nov 13 2015 22:16
"Mom, what a cute old TI calculator!"
"Sshhhh! Kekekeks is looking this way!"
...seriously, why shouldn't we support that as well
Nikita Tsukanov
@kekekeks
Nov 13 2015 22:17
Well, I've managed to launch Mono, GTK# and MonoDevelop on Nokia N900, you know
hacklex
@hacklex
Nov 13 2015 22:17
I know
Egor Bogatov
@EgorBo
Nov 13 2015 22:18
"Sshhhh! Kekekeks is looking this way!" LOL
hacklex
@hacklex
Nov 13 2015 22:18
Pointless as f, awesome as 2*f, not a flying 1e-7f given by anyone else, no?
other than scared random developers who seen MonoDevelop running on your phone in subway
A shock and a trauma for the rest of their lives, I guess
Egor Bogatov
@EgorBo
Nov 13 2015 22:20
I guess we can expect Perspex for .Net micro & Raspberry PI as well?
hacklex
@hacklex
Nov 13 2015 22:22
I hope we are not to expect it for some Texas Instruments calculators and oscilloscopes from mid-80s
because, well, an oscilloscope is technically more than capable of drawing an arc (lol)
Actually, some modern ones are running WinXP
EgorBo @EgorBo was so excited to write in XAML for some oscilloscope :'(
hacklex
@hacklex
Nov 13 2015 22:25
<In Signal="{Sine Phase=0, F=3Mhz}" Transform="{Gain 20db}" >
something like this, I guess
Nikita Tsukanov
@kekekeks
Nov 13 2015 22:32

I guess we can expect Perspex for .Net micro & Raspberry PI as well?

Ehm... We already can run on Raspberry PI

Some has dude confirmed that
EgorBo @EgorBo thought he was joking...
Nikita Tsukanov
@kekekeks
Nov 13 2015 22:32
There should be a screenshot somewhere in chat history
hacklex
@hacklex
Nov 13 2015 22:37

@EgorBo thought he was joking...

...Little did he knew.
I told you to hide it when kekekeks is awake!

He fortunately can't solder, so we are happily limited to software solutions.
Egor Bogatov
@EgorBo
Nov 13 2015 22:40
but he probably is writting his own video card driver at the moment
hacklex
@hacklex
Nov 13 2015 22:53
he is probably flashing his own video card at the moment
And when I say "his own", well...
let's just say it is not completely vesa-compliant, because he needed its powers somewhere else, and vesa didn't allow that naturally.
Nikita Tsukanov
@kekekeks
Nov 13 2015 23:32

but he probably is writting his own video card driver at the moment

At the moment I'm trying to master Objective C++ in one night

Egor Bogatov
@EgorBo
Nov 13 2015 23:55
[good luck]; Just don't get lost with those nil, NULL, nullptr :) my code mixes obj c + c++ too
hacklex
@hacklex
Nov 13 2015 23:56

At the moment I'm trying to master Objective C++ in one night

...in a way non-lethal to one's iPhone