MCPcopy Create free account
hub / github.com/boostorg/compute / Initialize

Method Initialize

example/opengl_sphere.cpp:154–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 void Initialize(vtkRenderer *renderer, vtkActor *actor)
155 {
156 // initialize opengl extensions
157 vtkOpenGLExtensionManager *extensions =
158 static_cast<vtkOpenGLRenderWindow *>(renderer->GetRenderWindow())
159 ->GetExtensionManager();
160 extensions->LoadExtension("GL_ARB_vertex_buffer_object");
161
162 // initialize opencl/opengl shared context
163 m_context = compute::opengl_create_shared_context();
164 compute::device device = m_context.get_device();
165 std::cout << "device: " << device.name() << std::endl;
166
167 // create command queue for the gpu device
168 m_command_queue = compute::command_queue(m_context, device);
169 }
170
171 double* GetBounds()
172 {

Callers 1

mainFunction · 0.80

Calls 4

command_queueClass · 0.50
get_deviceMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected