summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxukai <xukai@multicorewareinc.com>2014-05-05 10:28:38 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-05 17:57:19 +0200
commit4493860167d998cf03274b6acc7c7959d5738c4b (patch)
tree590831e31c16ba0e2907a29dfd2e1e80038d4d10
parenteb0da9b80fa412202200cd5255e0e0eb6a9e38e9 (diff)
Update Function Set3DSenceInfo
Change-Id: Ic117de10be2181a80e65ea48c888789456abfb0a
-rw-r--r--chart2/source/view/inc/GL3DRenderer.hxx3
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx5
2 files changed, 2 insertions, 6 deletions
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx
index cc86beee21ae..26c971663b6f 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -160,8 +160,7 @@ public:
void LoadShaders();
void init();
- void Set3DSenceInfo(const glm::vec3& cameraUp, const glm::mat4& D3DTrasform,
- bool twoSidesLighting, sal_Int32 color);
+ void Set3DSenceInfo(const glm::vec3& cameraUp, sal_Int32 color, bool twoSidesLighting = false);
void SetLightInfo(bool lightOn, sal_Int32 color, const glm::vec4& direction);
void AddShapePolygon3DObject(sal_Int32 color, bool lineOnly, sal_Int32 lineColor,
long fillStyle, sal_Int32 specular);
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 0b210cbb320f..762c8731905b 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -577,7 +577,6 @@ void OpenGL3DRenderer::RenderLine3D(Polygon3DInfo &polygon)
PosVecf3 scale = {1.0f, m_fHeightWeight, 1.0f};
MoveModelf(trans, angle, scale);
- m_3DMVP = m_3DProjection * m_3DView * m_D3DTrasform;
m_3DMVP = m_3DProjection * m_3DView * m_Model;
//if line only, using the common shader to render
@@ -710,13 +709,11 @@ void OpenGL3DRenderer::RenderPolygon3DObject()
return;
}
-void OpenGL3DRenderer::Set3DSenceInfo(const glm::vec3& cameraUp, const glm::mat4& D3DTrasform, bool twoSidesLighting, sal_Int32 color)
+void OpenGL3DRenderer::Set3DSenceInfo(const glm::vec3& cameraUp, sal_Int32 color, bool twoSidesLighting)
{
m_CameraInfo.cameraUp = cameraUp;
- m_D3DTrasform = D3DTrasform;
-
m_Polygon3DInfo.material.twoSidesLighting = twoSidesLighting;
m_LightsInfo.ambient = glm::vec4((float)(((color) & 0x00FF0000) >> 16) / 255.0f,