testingman
Topic Author
Posts: 8
Joined: 27 Aug 2017, 15:02

Does this work with xamarin android?

28 Aug 2017, 21:24

So I've attempted to make the gl sdk sample work on android with xamarin, since some other forum posts indicated that it should work
Well it didn't for me and searching didn't help, so I was wondering whether anyone has any idea what might be happening.
I've tried to build this on top of the default android opengl template when creating a new project.
I set ContextRenderingApi to ES2
I made custom providers for xaml and font so all of that loads correctly
I call GUI.Init(), then GUI.SetResourceProvider, then I load the theme, create the view, call InitGL on the renderer (which crashed on the x86 emulator with SIGABRT, but does work on an arm tablet) then in the rendering method I call UpdateRenderTree().
However, any calls to Renderer's NeedsOffscreen(), RenderOffscreen() or Render() result in an unknown crash.
I get this in the output:
08-28 22:08:58.171 D/Mono (13426): Searching for 'Noesis_Renderer_NeedsOffscreen'.
08-28 22:08:58.171 D/Mono (13426): Probing 'Noesis_Renderer_NeedsOffscreen'.
08-28 22:08:58.171 D/Mono (13426): Found as 'Noesis_Renderer_NeedsOffscreen'.
08-28 22:08:58.179 E/mono-rt (13426): Stacktrace:
08-28 22:08:58.179 E/mono-rt (13426):
08-28 22:08:58.179 E/mono-rt (13426): at <unknown> <0xffffffff>
08-28 22:08:58.179 E/mono-rt (13426): at (wrapper managed-to-native) Noesis.Renderer.Noesis_Renderer_NeedsOffscreen (System.Runtime.InteropServices.HandleRef) <0x0003f>
08-28 22:08:58.179 E/mono-rt (13426): at Noesis.Renderer.Noesis_Renderer_NeedsOffscreen_ (System.Runtime.InteropServices.HandleRef) [0x00001] in <ca756331d9a94731a2f766f5a2bbb172>:0
08-28 22:08:58.179 E/mono-rt (13426): at Noesis.Renderer.NeedsOffscreen () [0x00006] in <ca756331d9a94731a2f766f5a2bbb172>:0
08-28 22:08:58.179 E/mono-rt (13426): at App1.GLView1.OnRenderFrame (OpenTK.FrameEventArgs) [0x000c6]
Does anyone have any idea what I might've missed?
Is there perhaps some way to see a more detailed log?
Any help is appreciated.
 
testingman
Topic Author
Posts: 8
Joined: 27 Aug 2017, 15:02

Re: Does this work with xamarin android?

28 Aug 2017, 23:11

wow I feel like I have severe brain damage
I forgot to call view update
it now works without problems on xamarin android
my apologies for wasting this forum's precious kilobytes
here's some working code in case someone is as stupid as I am (it renders stuff, but touch doesn't work and I'm not sure if everything is correct, sorry, but it kinda works): https://pastebin.com/9k5EcZUd
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Does this work with xamarin android?

30 Aug 2017, 12:58

Hi, as you found it should work fine with Xamarin Android.

Anyway we should check these crashes occurring when Update is not called before using Renderer, could you please report it in our bugtracker?
 
testingman
Topic Author
Posts: 8
Joined: 27 Aug 2017, 15:02

Re: Does this work with xamarin android?

30 Aug 2017, 19:42

could you please report it in our bugtracker?
Sorry, I can't, as I am unable to register a new account, it keeps giving me this error:
APPLICATION ERROR #1904
Confirmation hash does not match. Please retry.
I thought maybe I entered the captcha incorrectly, but after several attempts I still get this error.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Does this work with xamarin android?

02 Sep 2017, 15:07

Not sure what's going on, I tried registering a new account and it is working fine... Thanks anyway, I added your issue this to our private tracker!

Who is online

Users browsing this forum: Google [Bot] and 1 guest