diff options
Diffstat (limited to 'intern/gawain/gawain/gwn_buffer_id.h')
-rw-r--r-- | intern/gawain/gawain/gwn_buffer_id.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/intern/gawain/gawain/gwn_buffer_id.h b/intern/gawain/gawain/gwn_buffer_id.h new file mode 100644 index 00000000000..db5df99f526 --- /dev/null +++ b/intern/gawain/gawain/gwn_buffer_id.h @@ -0,0 +1,34 @@ + +// Gawain buffer IDs +// +// This code is part of the Gawain library, with modifications +// specific to integration with Blender. +// +// Copyright 2016 Mike Erwin +// +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of +// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + +#pragma once + +// Manage GL buffer IDs in a thread-safe way +// Use these instead of glGenBuffers & its friends +// - alloc must be called from main thread +// - free can be called from any thread + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gwn_common.h" + +GLuint GWN_buf_id_alloc(void); +void GWN_buf_id_free(GLuint buffer_id); + +GLuint GWN_vao_alloc(void); +void GWN_vao_free(GLuint vao_id); + + +#ifdef __cplusplus +} +#endif |