| 233 | } |
| 234 | |
| 235 | HRenderListDispatch RenderListMakeDispatch(HRenderContext render_context, RenderListDispatchFn dispatch_fn, RenderListVisibilityFn visibility_fn, void* user_data) |
| 236 | { |
| 237 | if (render_context->m_RenderListDispatch.Size() == render_context->m_RenderListDispatch.Capacity()) |
| 238 | { |
| 239 | dmLogError("Exhausted number of render dispatches. Too many collections?"); |
| 240 | return RENDERLIST_INVALID_DISPATCH; |
| 241 | } |
| 242 | |
| 243 | // store & return index |
| 244 | RenderListDispatch d; |
| 245 | d.m_DispatchFn = dispatch_fn; |
| 246 | d.m_VisibilityFn = visibility_fn; |
| 247 | d.m_UserData = user_data; |
| 248 | render_context->m_RenderListDispatch.Push(d); |
| 249 | DM_PROPERTY_ADD_U32(rmtp_RenderDispatchCount, 1); |
| 250 | |
| 251 | return render_context->m_RenderListDispatch.Size() - 1; |
| 252 | } |
| 253 | |
| 254 | HRenderListDispatch RenderListMakeDispatch(HRenderContext render_context, RenderListDispatchFn dispatch_fn, void* user_data) |
| 255 | { |