Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_context.cc
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| static void gpu_backend_discard(); | static void gpu_backend_discard(); | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name gpu::Context methods | /** \name gpu::Context methods | ||||
| * \{ */ | * \{ */ | ||||
| namespace blender::gpu { | namespace blender::gpu { | ||||
| int Context::context_counter = 0; | |||||
| Context::Context() | Context::Context() | ||||
| { | { | ||||
| thread_ = pthread_self(); | thread_ = pthread_self(); | ||||
| is_active_ = false; | is_active_ = false; | ||||
| matrix_state = GPU_matrix_state_create(); | matrix_state = GPU_matrix_state_create(); | ||||
| context_id = Context::context_counter; | |||||
| Context::context_counter++; | |||||
| } | } | ||||
| Context::~Context() | Context::~Context() | ||||
| { | { | ||||
| GPU_matrix_state_discard(matrix_state); | GPU_matrix_state_discard(matrix_state); | ||||
| delete state_manager; | delete state_manager; | ||||
| delete front_left; | delete front_left; | ||||
| delete back_left; | delete back_left; | ||||
| ▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines | |||||