chart2/opengl/backgroundFragmentShader.glsl | 11 +++++++++++ chart2/opengl/backgroundVertexShader.glsl | 11 +++++++++++ chart2/opengl/commonFragmentShader.glsl | 11 +++++++++++ chart2/opengl/commonVertexShader.glsl | 11 +++++++++++ chart2/opengl/debugFragmentShader.glsl | 10 ++++++++++ chart2/opengl/debugVertexShader.glsl | 10 ++++++++++ chart2/opengl/renderFragmentShader.glsl | 11 +++++++++++ chart2/opengl/renderVertexShader.glsl | 11 +++++++++++ chart2/opengl/symbolFragmentShader.glsl | 11 +++++++++++ chart2/opengl/symbolVertexShader.glsl | 11 +++++++++++ chart2/opengl/textFragmentShader.glsl | 11 +++++++++++ chart2/opengl/textVertexShader.glsl | 11 +++++++++++ chart2/source/view/main/OpenGLRender.cxx | 9 +++++---- 13 files changed, 135 insertions(+), 4 deletions(-)
New commits: commit fb982d1fcaefe76f4e71a17b88e887a1d38dabdc Author: Markus Mohrhard <[email protected]> Date: Fri Jan 31 19:23:54 2014 +0100 add license headers to glsl files Change-Id: Ib473d7bbb39f50f5fea549e69dcac0e938a1700a diff --git a/chart2/opengl/backgroundFragmentShader.glsl b/chart2/opengl/backgroundFragmentShader.glsl index e772587..805789e 100644 --- a/chart2/opengl/backgroundFragmentShader.glsl +++ b/chart2/opengl/backgroundFragmentShader.glsl @@ -1,6 +1,17 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + varying vec4 fragmentColor; void main() { gl_FragColor = fragmentColor; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/backgroundVertexShader.glsl b/chart2/opengl/backgroundVertexShader.glsl index 2a3a341..6d9d6c2 100644 --- a/chart2/opengl/backgroundVertexShader.glsl +++ b/chart2/opengl/backgroundVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + attribute vec3 vPosition; uniform mat4 MVP; attribute vec4 vColor; @@ -8,3 +17,5 @@ void main() gl_Position = MVP * vec4(vPosition, 1); fragmentColor = vColor; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/commonFragmentShader.glsl b/chart2/opengl/commonFragmentShader.glsl index e772587..805789e 100644 --- a/chart2/opengl/commonFragmentShader.glsl +++ b/chart2/opengl/commonFragmentShader.glsl @@ -1,6 +1,17 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + varying vec4 fragmentColor; void main() { gl_FragColor = fragmentColor; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/commonVertexShader.glsl b/chart2/opengl/commonVertexShader.glsl index 862a35b..f32e3fd 100644 --- a/chart2/opengl/commonVertexShader.glsl +++ b/chart2/opengl/commonVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + attribute vec3 vPosition; uniform mat4 MVP; uniform vec4 vColor; @@ -8,3 +17,5 @@ void main() gl_Position = MVP * vec4(vPosition, 1); fragmentColor = vColor; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/debugFragmentShader.glsl b/chart2/opengl/debugFragmentShader.glsl index ce7f863..d36c4f4 100644 --- a/chart2/opengl/debugFragmentShader.glsl +++ b/chart2/opengl/debugFragmentShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + varying vec4 fragmentColor; void main() @@ -5,3 +14,4 @@ void main() gl_FragColor = vec4(1.0, 1.0, 0.0, 0.5); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/debugVertexShader.glsl b/chart2/opengl/debugVertexShader.glsl index c0f3d03..762de31 100644 --- a/chart2/opengl/debugVertexShader.glsl +++ b/chart2/opengl/debugVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + attribute vec3 vPosition; uniform vec4 vColor; varying vec4 fragmentColor; @@ -7,3 +16,4 @@ void main() gl_Position = vec4(vPosition, 1); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/renderFragmentShader.glsl b/chart2/opengl/renderFragmentShader.glsl index dd08d9a..a6c71f4 100644 --- a/chart2/opengl/renderFragmentShader.glsl +++ b/chart2/opengl/renderFragmentShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + uniform sampler2D RenderTex; varying vec2 vTexCoord; @@ -5,3 +14,5 @@ void main() { gl_FragColor = vec4(texture2D(RenderTex, vTexCoord).rgb, 1.0); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/renderVertexShader.glsl b/chart2/opengl/renderVertexShader.glsl index 1c9d3ce..8c55629 100644 --- a/chart2/opengl/renderVertexShader.glsl +++ b/chart2/opengl/renderVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + attribute vec4 vPosition; attribute vec2 texCoord; varying vec2 vTexCoord; @@ -7,3 +16,5 @@ void main() gl_Position = vPosition; vTexCoord = texCoord; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/symbolFragmentShader.glsl b/chart2/opengl/symbolFragmentShader.glsl index 6d60436..a84d83c 100644 --- a/chart2/opengl/symbolFragmentShader.glsl +++ b/chart2/opengl/symbolFragmentShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +# #version 120 varying vec4 fragmentColor; @@ -10,3 +19,5 @@ void main() gl_FragColor = fragmentColor; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/symbolVertexShader.glsl b/chart2/opengl/symbolVertexShader.glsl index b7a9af2..e1bbec9 100644 --- a/chart2/opengl/symbolVertexShader.glsl +++ b/chart2/opengl/symbolVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + #version 120 attribute vec3 vPosition; @@ -11,3 +20,5 @@ void main() fragmentColor = vColor; gl_PointSize = 10.0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/textFragmentShader.glsl b/chart2/opengl/textFragmentShader.glsl index 83d0d82..ef8d44d 100644 --- a/chart2/opengl/textFragmentShader.glsl +++ b/chart2/opengl/textFragmentShader.glsl @@ -1,6 +1,17 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + uniform sampler2D TextTex; varying vec2 vTexCoord; void main() { gl_FragColor = vec4(texture2D(TextTex, vTexCoord).rgba); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/textVertexShader.glsl b/chart2/opengl/textVertexShader.glsl index 013f43c..a805229 100644 --- a/chart2/opengl/textVertexShader.glsl +++ b/chart2/opengl/textVertexShader.glsl @@ -1,3 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + attribute vec3 vPosition; uniform mat4 MVP; attribute vec2 texCoord; @@ -7,3 +16,5 @@ void main() gl_Position = MVP * vec4(vPosition, 1); vTexCoord = texCoord; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 5669da20e79aa3a76af440b7b972e0e8a5868e9e Author: Markus Mohrhard <[email protected]> Date: Fri Jan 31 19:20:14 2014 +0100 standardize the z oder handling a bit more Change-Id: I2d1eea5ffad071f37ea8475ce5ead5fb05e145c6 diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index da99f81..9cc75cb 100755 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -62,7 +62,7 @@ using namespace std; #define WGL_SAMPLES_ARB 0x2042 #endif -#define Z_STEP 0.001; +#define Z_STEP 0.001 // end shaders @@ -507,7 +507,6 @@ int OpenGLRender::SetLine2DShapePoint(float x, float y, int listLength) int OpenGLRender::RenderLine2FBO(int) { - m_fZStep += Z_STEP; CHECK_GL_ERROR(); glLineWidth(m_fLineWidth); size_t listNum = m_Line2DShapePointList.size(); @@ -554,6 +553,7 @@ int OpenGLRender::RenderLine2FBO(int) GLenum status; CHECK_GL_ERROR(); CHECK_GL_FRAME_BUFFER_STATUS(); + m_fZStep += Z_STEP; return 0; } @@ -1286,7 +1286,6 @@ int OpenGLRender::RectangleShapePoint(float x, float y, float directionX, float int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) { - m_fZStep += Z_STEP; size_t listNum = m_RectangleShapePointList.size(); for (size_t i = 0; i < listNum; i++) { @@ -1377,6 +1376,8 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) m_RectangleShapePointList.pop_front(); } CHECK_GL_ERROR(); + + m_fZStep += Z_STEP; return 0; } @@ -1487,7 +1488,6 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos, int OpenGLRender::RenderTextShape() { CHECK_GL_ERROR(); - m_fZStep += Z_STEP; size_t listNum = m_TextInfoList.size(); for (size_t i = 0; i < listNum; i++) { @@ -1537,6 +1537,7 @@ int OpenGLRender::RenderTextShape() m_TextInfoList.pop_front(); } CHECK_GL_ERROR(); + m_fZStep += Z_STEP; return 0; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
