Bug 20796 - OpenTk GL.BufferSubData Function Overload issue
Summary: OpenTk GL.BufferSubData Function Overload issue
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.12.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2014-06-22 06:07 UTC by Rowan
Modified: 2017-06-27 18:11 UTC (History)
2 users (show)

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

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:
Status:
RESOLVED NORESPONSE

Description Rowan 2014-06-22 06:07:24 UTC
I am using Opengl es 2.0 

the following function overload causes visual issues when rendering (the correct data is not uploaded, it is like it is pointing to a wrong memory location)

 GL.BufferSubData(All.ElementArrayBuffer, (IntPtr)ost, (IntPtr)(numI * 2), ref IaBff[ost]);

I have tried another overload that works well so it is just the above overload that has issues 

                    unsafe
                    {
                        fixed (short* pArray = IaBff)
                        {
                            GL.BufferSubData(All.ElementArrayBuffer, (IntPtr)ost, (IntPtr)(numI * 2), new IntPtr(pArray) + ost);
                        }
                    }


The desktop OpenTk works fine for both overloads, just the mobile opentk for android has problems for the first overload
Comment 1 Rowan 2014-06-22 06:43:35 UTC
sorry here is the actually overload that has a problem(not my implementation)

 public static void BufferSubData<T3>(All target, IntPtr offset, IntPtr size, [In, Out] ref T3 data) 


and here is the one that works fine

public static void BufferSubData(All target, IntPtr offset, IntPtr size, IntPtr data);
Comment 2 Radek Doulik 2014-07-01 12:35:11 UTC
could you please attach a test case? does it happen with Xamarin Android 4.14.x as well? (4.14.x is available in the alpha channel)
Comment 3 Chris Hardy [MSFT] 2017-06-27 18:11:48 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!