36 : shared_orphan_list_(shared_orphan_list)
42 float data[4] = {0.0f, 0.0f, 0.0f, 1.0f};
45 glBufferData(GL_ARRAY_BUFFER,
sizeof(
data),
data, GL_STATIC_DRAW);
46 glBindBuffer(GL_ARRAY_BUFFER, 0);
59 if (default_fbo != 0) {
62 glBindFramebuffer(GL_FRAMEBUFFER, default_fbo);
71 GLboolean supports_stereo_quad_buffer = GL_FALSE;
72 glGetBooleanv(GL_STEREO, &supports_stereo_quad_buffer);
73 if (supports_stereo_quad_buffer) {
204 void GLContext::orphans_clear()
210 if (!orphaned_vertarrays_.
is_empty()) {
211 glDeleteVertexArrays((
uint)orphaned_vertarrays_.
size(), orphaned_vertarrays_.
data());
212 orphaned_vertarrays_.
clear();
214 if (!orphaned_framebuffers_.
is_empty()) {
215 glDeleteFramebuffers((
uint)orphaned_framebuffers_.
size(), orphaned_framebuffers_.
data());
216 orphaned_framebuffers_.
clear();
218 lists_mutex_.unlock();
233 glDeleteVertexArrays(1, &vao_id);
236 orphans_add(orphaned_vertarrays_, lists_mutex_, vao_id);
243 glDeleteFramebuffers(1, &fbo_id);
246 orphans_add(orphaned_framebuffers_, lists_mutex_, fbo_id);
254 glDeleteBuffers(1, &buf_id);
266 glDeleteTextures(1, &tex_id);
287 vao_caches_.add(cache);
288 lists_mutex_.unlock();
294 vao_caches_.remove(cache);
295 lists_mutex_.unlock();
307 if (GLEW_NVX_gpu_memory_info) {
309 glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, r_total_mem);
310 glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, r_free_mem);
312 else if (GLEW_ATI_meminfo) {
314 glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, stats);
317 *r_free_mem = stats[0];
GHOST C-API function and type declarations.
int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
unsigned int GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle)
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void append(const T &value)
StateManager * state_manager
bool is_active_on_thread()
FrameBuffer * front_right
void size_set(int width, int height)
GLSharedOrphanLists & shared_orphan_list_get()
static void buf_free(GLuint buf_id)
void begin_frame() override
void memory_statistics_get(int *total_mem, int *free_mem) override
GLContext(void *ghost_window, GLSharedOrphanLists &shared_orphan_list)
void vao_cache_unregister(GLVaoCache *cache)
static void tex_free(GLuint tex_id)
void deactivate() override
void vao_free(GLuint vao_id)
void end_frame() override
void vao_cache_register(GLVaoCache *cache)
void fbo_free(GLuint fbo_id)
Vector< GLuint > textures