Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2D/Internals/OpenGLBasicPolylineRenderer.cpp @ 1571:85e117739eca
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 17:46:39 +0200 |
parents | 244ad1e4e76a |
children | 8563ea5d8ae4 |
comparison
equal
deleted
inserted
replaced
1570:9a04f42098a3 | 1571:85e117739eca |
---|---|
32 context_(context) | 32 context_(context) |
33 { | 33 { |
34 layer_.Copy(layer); | 34 layer_.Copy(layer); |
35 } | 35 } |
36 | 36 |
37 void OpenGLBasicPolylineRenderer::Render(const AffineTransform2D& transform) | 37 void OpenGLBasicPolylineRenderer::Render(const AffineTransform2D& transform, |
38 unsigned int canvasWidth, | |
39 unsigned int canvasHeight) | |
38 { | 40 { |
39 if (!context_.IsContextLost()) | 41 if (!context_.IsContextLost()) |
40 { | 42 { |
41 AffineTransform2D t = AffineTransform2D::Combine( | 43 AffineTransform2D t = AffineTransform2D::Combine( |
42 AffineTransform2D::CreateOpenGLClipspace(context_.GetCanvasWidth(), context_.GetCanvasHeight()), | 44 AffineTransform2D::CreateOpenGLClipspace(canvasWidth, canvasHeight), |
43 transform); | 45 transform); |
44 | 46 |
45 glUseProgram(0); | 47 glUseProgram(0); |
46 | 48 |
47 glBegin(GL_LINES); | 49 glBegin(GL_LINES); |