diff options
author | YangZhang <yangzhang@multicorewareinc.com> | 2013-12-30 17:20:18 +0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-29 08:09:23 +0100 |
commit | 4b7d8ad5e785a5421800de29faa8fcb462d8f80d (patch) | |
tree | dfbbe084527aa0aae80ffe7150bc69ed2d0feff7 /chart2 | |
parent | 0f6fca34909535b48bad41e73e5d3d0e86c744b9 (diff) |
fix linux compilation
Change-Id: I1631fe4abfd1a14d39410e6e75883949dfc15c18
Signed-off-by: shaochunfang <shaochun@multicorewareinc.com>
Diffstat (limited to 'chart2')
-rwxr-xr-x | chart2/source/view/main/OpenGLRender.cxx | 7 | ||||
-rwxr-xr-x | chart2/source/view/main/OpenGLRender.hxx | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 6e8801035e2c..d76b4fae464a 100755 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -996,6 +996,7 @@ void OpenGLRender::SetLine2DWidth(int width) m_fLineWidth = (m_fLineWidth < 0.001) ? 0.001 : m_fLineWidth; } +#if defined( _WIN32 ) static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) @@ -1106,7 +1107,7 @@ int OpenGLRender::InitMultisample(PIXELFORMATDESCRIPTOR pfd) DestroyWindow(hWnd); return m_iArbMultisampleSupported; } - +#endif int OpenGLRender::GetMSAASupport() { return m_iArbMultisampleSupported; @@ -1117,6 +1118,7 @@ int OpenGLRender::GetMSAAFormat() return m_iArbMultisampleFormat; } +#if defined( _WIN32 ) int OpenGLRender::InitTempWindow(HWND *hwnd, int width, int height, PIXELFORMATDESCRIPTOR inPfd) { PIXELFORMATDESCRIPTOR pfd = inPfd; @@ -1157,7 +1159,6 @@ int OpenGLRender::InitTempWindow(HWND *hwnd, int width, int height, PIXELFORMATD } return 0; } - int OpenGLRender::WGLisExtensionSupported(const char *extension) { const size_t extlen = strlen(extension); @@ -1194,7 +1195,7 @@ int OpenGLRender::WGLisExtensionSupported(const char *extension) } return 1; } - +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index 5643bc9eebb2..70b05e05778a 100755 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -124,7 +124,9 @@ public: void SetLine2DColor(sal_uInt8 r, sal_uInt8 g, sal_uInt8 b); void SetLine2DWidth(int width); BitmapEx GetAsBitmap(); +#if defined( _WIN32 ) int InitMultisample(PIXELFORMATDESCRIPTOR pfd); +#endif int GetMSAASupport(); int GetMSAAFormat(); private: @@ -134,7 +136,9 @@ private: int CreateFrameBufferObj(); int RenderTexture(GLuint TexID); int RenderTexture2FBO(GLuint TexID); +#if defined( _WIN32 ) int InitTempWindow(HWND *hwnd, int width, int height, PIXELFORMATDESCRIPTOR inPfd); +#endif int WGLisExtensionSupported(const char *extension); private: // Projection matrix : default 45 degree Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units |