|  | @@ -1,4 +1,5 @@
 | 
											
												
													
														|  |  #include "MandelWidget.h"
 |  |  #include "MandelWidget.h"
 | 
											
												
													
														|  | 
 |  | +#include <cmath>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  using namespace mnd;
 |  |  using namespace mnd;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -88,7 +89,7 @@ void MandelView::adaptViewport(const MandelViewport& vp)
 | 
											
												
													
														|  |                  auto fmap = Bitmap<float>(mi.bWidth, mi.bHeight);
 |  |                  auto fmap = Bitmap<float>(mi.bWidth, mi.bHeight);
 | 
											
												
													
														|  |                  generator.generate(mi, fmap.pixels.get());
 |  |                  generator.generate(mi, fmap.pixels.get());
 | 
											
												
													
														|  |                  auto bitmap = fmap.map<RGBColor>([](float i) { return i < 0 ? RGBColor{ 0,0,0 } : RGBColor{ uint8_t(cos(i * 0.015f) * 127 + 127), uint8_t(sin(i * 0.01f) * 127 + 127), uint8_t(i) }; });//uint8_t(::sin(i * 0.01f) * 100 + 100), uint8_t(i) }; });
 |  |                  auto bitmap = fmap.map<RGBColor>([](float i) { return i < 0 ? RGBColor{ 0,0,0 } : RGBColor{ uint8_t(cos(i * 0.015f) * 127 + 127), uint8_t(sin(i * 0.01f) * 127 + 127), uint8_t(i) }; });//uint8_t(::sin(i * 0.01f) * 100 + 100), uint8_t(i) }; });
 | 
											
												
													
														|  | -                emit updated(new Bitmap(std::move(bitmap)));
 |  | 
 | 
											
												
													
														|  | 
 |  | +                emit updated(new Bitmap<RGBColor>(std::move(bitmap)));
 | 
											
												
													
														|  |              } while(hasToCalc.exchange(false));
 |  |              } while(hasToCalc.exchange(false));
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
										
											
												
													
														|  | @@ -102,7 +103,7 @@ void MandelView::adaptViewport(const MandelViewport& vp)
 | 
											
												
													
														|  |  MandelWidget::MandelWidget(mnd::MandelContext& ctxt, QWidget* parent) :
 |  |  MandelWidget::MandelWidget(mnd::MandelContext& ctxt, QWidget* parent) :
 | 
											
												
													
														|  |      QGLWidget{ QGLFormat(QGL::SampleBuffers), parent },
 |  |      QGLWidget{ QGLFormat(QGL::SampleBuffers), parent },
 | 
											
												
													
														|  |      mndContext{ ctxt },
 |  |      mndContext{ ctxt },
 | 
											
												
													
														|  | -    mv{ *ctxt.getDevices()[0].getGeneratorDouble() }
 |  | 
 | 
											
												
													
														|  | 
 |  | +    mv{ ctxt.getDefaultGenerator() }
 | 
											
												
													
														|  |  {
 |  |  {
 | 
											
												
													
														|  |      this->setContentsMargins(0, 0, 0, 0);
 |  |      this->setContentsMargins(0, 0, 0, 0);
 | 
											
												
													
														|  |      this->setSizePolicy(QSizePolicy::Expanding,
 |  |      this->setSizePolicy(QSizePolicy::Expanding,
 |