Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_context_private.hh
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | protected: | ||||
| void *ghost_window_; | void *ghost_window_; | ||||
| public: | public: | ||||
| GPUContext(); | GPUContext(); | ||||
| virtual ~GPUContext(); | virtual ~GPUContext(); | ||||
| virtual void activate(void) = 0; | virtual void activate(void) = 0; | ||||
| virtual void deactivate(void) = 0; | virtual void deactivate(void) = 0; | ||||
| virtual void memory_statistics_get(int *total_mem, int *free_mem) = 0; | |||||
| bool is_active_on_thread(void); | bool is_active_on_thread(void); | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GPUContext") | MEM_CXX_CLASS_ALLOC_FUNCS("GPUContext") | ||||
| }; | }; | ||||
| /* These require a OpenGL ctx bound. */ | |||||
| GLuint GPU_buf_alloc(void); | |||||
| GLuint GPU_tex_alloc(void); | |||||
| GLuint GPU_vao_alloc(void); | |||||
| GLuint GPU_fbo_alloc(void); | |||||
| /* These can be called any threads even without OpenGL ctx. */ | |||||
| void GPU_buf_free(GLuint buf_id); | |||||
| void GPU_tex_free(GLuint tex_id); | |||||
| /* These two need the ctx the id was created with. */ | |||||
| void GPU_vao_free(GLuint vao_id, GPUContext *ctx); | |||||
| void GPU_fbo_free(GLuint fbo_id, GPUContext *ctx); | |||||
| void gpu_context_active_framebuffer_set(GPUContext *ctx, struct GPUFrameBuffer *fb); | void gpu_context_active_framebuffer_set(GPUContext *ctx, struct GPUFrameBuffer *fb); | ||||
| struct GPUFrameBuffer *gpu_context_active_framebuffer_get(GPUContext *ctx); | struct GPUFrameBuffer *gpu_context_active_framebuffer_get(GPUContext *ctx); | ||||
| struct GPUMatrixState *gpu_context_active_matrix_state_get(void); | struct GPUMatrixState *gpu_context_active_matrix_state_get(void); | ||||