Hi Don, I've taken a look at the OpenTK bindings included in MonoTouch and, as you've noted, could not find ReadOnly nor ReadWrite flags. This prompted to me look at more recent OpenTK bindings to see if maybe they had it (they didn't). So I started looking through the OpenGLES headers in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES1/glext.h
These seem to be the flags available for use with MapBuffer: #if GL_OES_mapbuffer #define GL_WRITE_ONLY_OES 0x88B9 #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD #endif These seem to map to the following enum values in All: WriteOnlyOes = ((int)0x88B9), BufferAccessOes = ((int)0x88BB), BufferMappedOes = ((int)0x88BC), BufferMapPointerOes = ((int)0x88BD), Unfortunately, I'm not very familiar with OpenGLES programming, so I did a google search and found this which might be useful: http://www.khronos.org/registry/gles/extensions/OES/OES_mapbuffer.txt This suggests that the only actual 'access' flag is GL_WRITE_ONLY which suggests to me that in order to get read-only, you'd use a value of 0 and read-write would just be GL_WRITE_ONLY (GL_WRITE_ONLY|GL_READ_ONLY == GL_WRITE_ONLY). So, if you want read-only access, you'd do: MapBuffer (All.<target>, (All) 0); If, instead, you want read-write access, you'd do: MapBuffer (All.<target>, All.WriteOnlyOes); Hope that helps, Jeff On Fri, Oct 7, 2011 at 12:11 PM, Don Freiling <[email protected]> wrote: > > The OpenTK.Graphics.ES11 namespace contains the method: > > public static IntPtr MapBuffer (All target, All access) > > > > The only valid flags for access are ReadOnly, WriteOnly and ReadWrite. > > > > The All enumeration is missing the ReadOnly and ReadWrite flags. How do I set > up a buffer with read access? > > > > > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
