Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 2603 [details]
When I create a mask and use this for draw in Equal mode, I have a different result (NotEqual).
if I use opentk (openGL 3.0) in windows it's work fine.
ps: in Android I use OpenGL ES 2.0
Created attachment 2632 [details]
project sample for monodevelop
after two months I want know when this bug will fix it.
We are just coming to the end of some internal projects, which will give me and few more developers time to really look into fixing this issue. I looked at it when you posted your initial report, but it does not look to be a quick fix, as far as I can tell, hence why it was delayed.
Apologies for the delay in communicating this back to.
I re-created the same code in Java as the attached application, oddly we get exactly the same results as we get with Managed code. So I don't think this is a bug in Mono for Android, it looks like an implementation issue on android itself....
I'll re-create a windows sample and check the output on there as well.
In Windows version it work fine but I use OpenGL v3.
When I make my test under android, I tried to invert the enums but I has equal result.
I don't found a workaround for this issue.
if you will found a workaround for all android os version it will be perfect for me.
I created an OpenTK sample under windows and the StencilFunction of Equal and NotEqual do not appear to change the rendering output at all. I assume this is the behavior you are expecting?
I am attaching screen shots of the various applications to show the differences.
Created attachment 3006 [details]
Screenshots of various apps
Both the MfA and Java apps work the same, the app I wrote for Windows displays differently. Do you have the sample you did for windows so I can test it here?
screenshot of the Android version is correct, but you used the emulator?
I used two devices, an Acer Liquid (GPU Adreno 200) and a tablet samsung galaxy tab 7 (gpu mali 400 mp) and I have the same results.
equal or notequal I see this ...
Created attachment 3007 [details]
equal and notequal
I tested this on a Galaxy S device. I did not test on an emulator as I was using GLES 2.0 and I dont have the Intel HW acceleration setup.
I'll attach the code for the Java sample so you can test it on your device.
Oddly the Windows version using OpenTK produced similar results to what came off your devices..
Created attachment 3008 [details]
Sample Java Application
Could I ask you to test the Attached Java application on your devices please and let us know what happens.
LessonOneRenderer.java is the file that you need to edit to change the stencil operation.
how to open this project?
Its an android project. you will need to compile it using the android SDK and ant.
see this link for more details
If you havent touched Java before let me know and I will send over 2 .apk files pre-compiled for you to test :)
I can open this project with eclipse?
if you can send me .apk it would be better. :)
Created attachment 3010 [details]
Test for Stencil Test GL_EQUAL
Created attachment 3011 [details]
Test for Stencil Test GL_NOTEQUAL
I added 2 versions of the application.
They are the same app so you can only install one at a time. but they should allow you to replicate the issue.
Please let me know how it turns out, If the Java applications do not show the correct results I think that points to a problem with the drivers on the device which are out of our control.
On my Galaxy S, I get the following
GL_EQUAL.apk => A small Triangle which is the bottom left of the main large triangle.
GL_EQUAL.apk => A Large triangle with the area of the small Triangle from the previous sample cut out.
I have some result, a Large triangle with the area of the small Triangle from the
previous sample cut out.
Ok, I understand, this is not mono android bug.
Thank you for your time