AnsweredAssumed Answered

OpenGL: Best way to stream buffer data on OSX?

Question asked by bbazyk on Apr 11, 2014

Hello all, I'm working on optimizing an existing established engine to run well on a target of OSX OpenGL 3.2.

The best performing code I've found so far is creating relatively large (1-4MB) fixed sized uniform, index and vertex buffers and then streaming using the map/unmap with fences method.  glBufferSubData on nVidia hardware seems to perform well and I imagine the AMD_pinned_memory extension would also though that isn't available to me on OSX (as far as I can tell).


Does anyone have another method to try that would run on OSX gl3.2?


So far I've tried:

map/unmap with sync points and explicit range flushes (fastest so far)

map/unmap with explicit buffer orphaning when you reach the end

glBufferSubData always at 0

glBufferSubData along a large buffer with sync points (similar to map/unmap with sync points)

glBufferData (orphaning every time)


I'm not sure if I am missing out on an entire way of doing things or some subtlety with one of these.


Thanks in advance,

~Brian Bazyk