src/ui/canvas.cpp

changeset 157
869fe95c4e5e
parent 129
f35843351601
child 164
8305e2f968fb
equal deleted inserted replaced
156:65b75beed7e0 157:869fe95c4e5e
143 glDisable(GL_LINE_SMOOTH); 143 glDisable(GL_LINE_SMOOTH);
144 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 144 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
145 } 145 }
146 // Render grid 146 // Render grid
147 { 147 {
148 glLineWidth(1);
148 glEnable(GL_BLEND); 149 glEnable(GL_BLEND);
150 glLineStipple(1, 0x8888);
151 glEnable(GL_LINE_STIPPLE);
149 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 152 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
150 this->gridProgram->draw(); 153 this->gridProgram->draw();
151 glDisable(GL_BLEND); 154 glDisable(GL_BLEND);
155 glDisable(GL_LINE_STIPPLE);
152 } 156 }
153 if (this->worldPosition.has_value()) 157 if (this->worldPosition.has_value())
154 { 158 {
155 QPainter painter{this}; 159 QPainter painter{this};
156 painter.setRenderHint(QPainter::Antialiasing); 160 painter.setRenderHint(QPainter::Antialiasing);

mercurial