Bug 31685 - Using VBOs in Xamarin.Forms OpenGL View does not render on physical android devices
Summary: Using VBOs in Xamarin.Forms OpenGL View does not render on physical android d...
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Seth Rosetter
Depends on:
Reported: 2015-07-06 23:39 UTC by Tyler_hartwig
Modified: 2015-08-02 00:09 UTC (History)
3 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Sample OpenGLView VBO project (77 bytes, text/plain)
2015-07-06 23:40 UTC, Tyler_hartwig

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Tyler_hartwig 2015-07-06 23:39:50 UTC
When attempting to use Vertex Buffer Objects in OpenGL code which is rendered in a OpenGLView, nothing is displayed on screen for physical Android devices.  If I run the provided sample project using XAP, everything is displayed just fine (a colorful cube bounces around the screen).  iOS devices work just fine as well (both simulator and physical).  However, if I try to run this project on a physical android device, nothing is rendered.  

Nexus 5 yields this output 

[Adreno-EGLSUB] <SwapBuffers:1348>: Invalid native buffer. Failed to queueBuffer
[Adreno-EGLSUB] <updater_thread:436>: native buffer is NULL

Another friend of told me of the same error for his Motorolla device.  

Additionally I have tested this on both a Galaxy S6 Edge, as well as a Galaxy Note 12.2, these give different outputs, and do not continuously output the previous error.  

I found the bug with Xamarin.Forms 1.3.3, and since then have confirmed it with 1.4.3.
Comment 1 Tyler_hartwig 2015-07-06 23:40:42 UTC
Created attachment 11894 [details]
Sample OpenGLView VBO project
Comment 2 Radek Doulik 2015-07-31 15:31:57 UTC
Hi Tyler,

the problem is not with VBO buffers, but with trying to set own framebuffer in the attached sample. GLSurfaceView (on Android) handles framebuffer creation/binding itself, so you don't need to create it. Just don't call CreateDisplayBuffers (); in Initialize () on Android and it should work OK.

If you need to choose the framebuffer configuration, use the http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setEGLConfigChooser(boolean)

Hope this helps.
Comment 4 Tyler_hartwig 2015-08-02 00:09:01 UTC
Thank you very much for these resources, my projects work very nicely now, sorry for the false bug-report, but thank you very much for your help