[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart' - 5 commits - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sat May 10 14:40:34 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    6 +++---
 chart2/source/view/main/3DChartObjects.cxx     |    6 +++---
 chart2/source/view/main/GL3DRenderer.cxx       |    7 +++++--
 3 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 872879a273691fb6762a252411c04bf50f087148
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat May 10 23:36:11 2014 +0200

    better colors for now
    
    Change-Id: I0d236d48d02faf65da2dfc9d3ce8fbdc1ad759ef

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 5fc1914..eabc36a 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -120,7 +120,7 @@ void GL3DBarChart::create3DShapes()
     glm::vec3 aEnd = aBegin;
     aEnd.x = nXEnd;
     pAxis->setPosition(aBegin, aEnd);
-    pAxis->setLineColor(COL_WHITE);
+    pAxis->setLineColor(COL_BLUE);
 
     // Y axis
     maShapes.push_back(new opengl3D::Line(mpRenderer.get(), nId++));
@@ -129,7 +129,7 @@ void GL3DBarChart::create3DShapes()
     aEnd = aBegin;
     aEnd.y = nYPos;
     pAxis->setPosition(aBegin, aEnd);
-    pAxis->setLineColor(COL_WHITE);
+    pAxis->setLineColor(COL_BLUE);
 
     // Chart background.
     maShapes.push_back(new opengl3D::Rectangle(mpRenderer.get(), nId++));
@@ -141,7 +141,7 @@ void GL3DBarChart::create3DShapes()
     aBottomRight.y = nYPos;
     pRect->setPosition(aTopLeft, aTopRight, aBottomRight);
     pRect->setFillColor(COL_BLACK);
-    pRect->setLineColor(COL_WHITE);
+    pRect->setLineColor(COL_BLUE);
 
     // Create category texts along X-axis at the bottom.
     uno::Sequence<OUString> aCats = mrCatProvider.getSimpleCategories();
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 24e00cc..030e968 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -1427,7 +1427,7 @@ void OpenGL3DRenderer::ProcessUnrenderedShape()
     glViewport(0, 0, m_iWidth, m_iHeight);
     glClearDepth(1.0f);
     glViewport(0, 0, m_iWidth, m_iHeight);
-    glClearColor(0.0, 0.0, 1.0, 1.0);
+    glClearColor(1.0, 1.0, 1.0, 1.0);
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     //Polygon
     RenderPolygon3DObject();
commit 17d04432f552e019e4c6cb708fe934325ed0e5f0
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat May 10 23:36:02 2014 +0200

    use rounded corners by default
    
    Change-Id: Id8cd44f98319c2064d10dcbcb1009a8a29fef484

diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 4f3f9ff..f46933e 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -49,7 +49,7 @@ void Renderable3DObject::render()
 
 Bar::Bar(OpenGL3DRenderer* pRenderer, const glm::mat4& rPosition, sal_Int32 aColor, sal_uInt32 nId)
     : Renderable3DObject(pRenderer, nId)
-    , mbRoundedCorners(false)
+    , mbRoundedCorners(true)
     , maPos(rPosition)
     , maColor(aColor)
 {
commit d8ac060c71f86cc2b17fc59aee8864667f822047
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat May 10 23:35:37 2014 +0200

    better camera position
    
    Change-Id: I63c7751c273b8ae46c4990561cf5a7084157121a

diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 08dab34..4f3f9ff 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -176,9 +176,9 @@ void Rectangle::setLineColor(const Color& rColor)
 
 Camera::Camera(OpenGL3DRenderer* pRenderer):
     Renderable3DObject(pRenderer, 0),
-    maPos(10,-50,10),
+    maPos(10,-50,20),
     maUp(0, 0, 1),
-    maDirection(glm::vec3(0,1,-0.2))
+    maDirection(glm::vec3(0,1,-0.5))
 {
 }
 
commit d489dec02ede2187dc7db8b6b078d329ddb166d6
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat May 10 23:17:19 2014 +0200

    whitespace cleanup
    
    Change-Id: Ib971ed2055974f6f11a69a81c28035c84c29b504

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 6886713..24e00cc 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -829,6 +829,7 @@ void OpenGL3DRenderer::SetLightInfo(bool lightOn, sal_Int32 color, const glm::ve
     {
         return;
     }
+
     if (lightOn)
     {
         m_LightsInfo.light[m_LightsInfo.lightNum].lightColor = glm::vec4((float)(((color) & 0x00FF0000) >> 16) / 255.0f,
@@ -866,7 +867,7 @@ void OpenGL3DRenderer::AddShapePolygon3DObject(sal_Int32 color,bool lineOnly,sal
 
 
     //material specular;
-     m_Polygon3DInfo.material.specular = glm::vec4((float)(((specular) & 0x00FF0000) >> 16) / 255.0f,
+    m_Polygon3DInfo.material.specular = glm::vec4((float)(((specular) & 0x00FF0000) >> 16) / 255.0f,
                                         (float)(((specular) & 0x0000FF00) >> 8) / 255.0f,
                                         (float)(((specular) & 0x000000FF)) / 255.0f,
                                         1.0);
commit 96b215fb6582f49c3f510cf1c40162e9fd72c35d
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat May 10 23:06:07 2014 +0200

    enable MSAA
    
    Change-Id: I38c29c2fd9ddbf6fc42fd1d94f9e34c561aab76d

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 5185d07..6886713 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -196,6 +196,8 @@ void OpenGL3DRenderer::init()
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
+    glEnable(GL_MULTISAMPLE);
+
     glClearColor (1.0, 1.0, 1.0, 1.0);
     glClear(GL_COLOR_BUFFER_BIT);
     glClearDepth(1.0f);


More information about the Libreoffice-commits mailing list