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); |