blob: e978eec67d80232d6b25219d886c20450ade6b7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 "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
|