MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / initializeGL

Method initializeGL

compute/example/mandelbrot.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void MandelbrotWidget::initializeGL()
109{
110 // setup opengl
111 glDisable(GL_LIGHTING);
112
113 // create the OpenGL/OpenCL shared context
114 context_ = compute::opengl_create_shared_context();
115
116 // get gpu device
117 compute::device gpu = context_.get_device();
118 std::cout << "device: " << gpu.name() << std::endl;
119
120 // setup command queue
121 queue_ = compute::command_queue(context_, gpu);
122
123 // build mandelbrot program
124 program_ = compute::program::create_with_source(source, context_);
125 program_.build();
126}
127
128void MandelbrotWidget::resizeGL(int width, int height)
129{

Callers

nothing calls this directly

Calls 5

buildMethod · 0.80
command_queueClass · 0.50
get_deviceMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected