Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9fbafe9f
Kaydet (Commit)
9fbafe9f
authored
May 13, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
May 13, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rerender after redrawing of the window
Change-Id: Ia967ba08a9bd0499ae5fb0865492783834204963
üst
f02999aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
4 deletions
+43
-4
GL3DBarChart.cxx
chart2/source/view/charttypes/GL3DBarChart.cxx
+13
-1
GL3DBarChart.hxx
chart2/source/view/inc/GL3DBarChart.hxx
+5
-1
openglwin.hxx
include/vcl/openglwin.hxx
+12
-1
openglwin.cxx
vcl/source/window/openglwin.cxx
+13
-1
No files found.
chart2/source/view/charttypes/GL3DBarChart.cxx
Dosyayı görüntüle @
9fbafe9f
...
@@ -33,10 +33,13 @@ GL3DBarChart::GL3DBarChart(
...
@@ -33,10 +33,13 @@ GL3DBarChart::GL3DBarChart(
mrWindow
(
rWindow
),
mrWindow
(
rWindow
),
mrCatProvider
(
rCatProvider
)
mrCatProvider
(
rCatProvider
)
{
{
mrWindow
.
setRenderer
(
this
);
mpRenderer
->
init
();
}
}
GL3DBarChart
::~
GL3DBarChart
()
GL3DBarChart
::~
GL3DBarChart
()
{
{
mrWindow
.
setRenderer
(
NULL
);
}
}
void
GL3DBarChart
::
create3DShapes
()
void
GL3DBarChart
::
create3DShapes
()
...
@@ -166,7 +169,6 @@ void GL3DBarChart::render()
...
@@ -166,7 +169,6 @@ void GL3DBarChart::render()
{
{
mrWindow
.
getContext
()
->
makeCurrent
();
mrWindow
.
getContext
()
->
makeCurrent
();
Size
aSize
=
mrWindow
.
GetSizePixel
();
Size
aSize
=
mrWindow
.
GetSizePixel
();
mpRenderer
->
init
();
mpRenderer
->
SetSize
(
aSize
);
mpRenderer
->
SetSize
(
aSize
);
mrWindow
.
getContext
()
->
setWinSize
(
aSize
);
mrWindow
.
getContext
()
->
setWinSize
(
aSize
);
for
(
boost
::
ptr_vector
<
opengl3D
::
Renderable3DObject
>::
iterator
itr
=
maShapes
.
begin
(),
for
(
boost
::
ptr_vector
<
opengl3D
::
Renderable3DObject
>::
iterator
itr
=
maShapes
.
begin
(),
...
@@ -178,6 +180,16 @@ void GL3DBarChart::render()
...
@@ -178,6 +180,16 @@ void GL3DBarChart::render()
mrWindow
.
getContext
()
->
swapBuffers
();
mrWindow
.
getContext
()
->
swapBuffers
();
}
}
void
GL3DBarChart
::
update
()
{
render
();
}
void
GL3DBarChart
::
clickedAt
(
const
Point
&
)
{
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
chart2/source/view/inc/GL3DBarChart.hxx
Dosyayı görüntüle @
9fbafe9f
...
@@ -29,7 +29,7 @@ class OpenGL3DRenderer;
...
@@ -29,7 +29,7 @@ class OpenGL3DRenderer;
}
}
class
GL3DBarChart
:
public
GL3DPlotterBase
class
GL3DBarChart
:
public
GL3DPlotterBase
,
public
IRenderer
{
{
public
:
public
:
GL3DBarChart
(
GL3DBarChart
(
...
@@ -43,6 +43,10 @@ public:
...
@@ -43,6 +43,10 @@ public:
virtual
void
render
()
SAL_OVERRIDE
;
virtual
void
render
()
SAL_OVERRIDE
;
virtual
void
update
()
SAL_OVERRIDE
;
virtual
void
clickedAt
(
const
Point
&
rPos
)
SAL_OVERRIDE
;
private
:
private
:
css
::
uno
::
Reference
<
css
::
chart2
::
XChartType
>
mxChartType
;
css
::
uno
::
Reference
<
css
::
chart2
::
XChartType
>
mxChartType
;
const
boost
::
ptr_vector
<
VDataSeries
>&
maDataSeries
;
const
boost
::
ptr_vector
<
VDataSeries
>&
maDataSeries
;
...
...
include/vcl/openglwin.hxx
Dosyayı görüntüle @
9fbafe9f
...
@@ -18,6 +18,14 @@
...
@@ -18,6 +18,14 @@
class
OpenGLContext
;
class
OpenGLContext
;
class
OpenGLWindowImpl
;
class
OpenGLWindowImpl
;
class
VCLOPENGL_DLLPUBLIC
IRenderer
{
public
:
virtual
~
IRenderer
()
{}
virtual
void
update
()
=
0
;
virtual
void
clickedAt
(
const
Point
&
rPos
)
=
0
;
};
// pImpl Pattern to avoid linking against OpenGL libs when using the class without the context
// pImpl Pattern to avoid linking against OpenGL libs when using the class without the context
class
VCLOPENGL_DLLPUBLIC
OpenGLWindow
:
public
SystemChildWindow
class
VCLOPENGL_DLLPUBLIC
OpenGLWindow
:
public
SystemChildWindow
{
{
...
@@ -26,11 +34,14 @@ public:
...
@@ -26,11 +34,14 @@ public:
virtual
~
OpenGLWindow
();
virtual
~
OpenGLWindow
();
OpenGLContext
*
getContext
();
OpenGLContext
*
getContext
();
virtual
void
Paint
(
const
Rectangle
&
)
SAL_OVERRIDE
{}
void
setRenderer
(
IRenderer
*
pRenderer
);
virtual
void
Paint
(
const
Rectangle
&
)
SAL_OVERRIDE
;
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
private
:
private
:
boost
::
scoped_ptr
<
OpenGLWindowImpl
>
mpImpl
;
boost
::
scoped_ptr
<
OpenGLWindowImpl
>
mpImpl
;
IRenderer
*
mpRenderer
;
};
};
#endif
#endif
...
...
vcl/source/window/openglwin.cxx
Dosyayı görüntüle @
9fbafe9f
...
@@ -32,7 +32,8 @@ OpenGLContext* OpenGLWindowImpl::getContext()
...
@@ -32,7 +32,8 @@ OpenGLContext* OpenGLWindowImpl::getContext()
OpenGLWindow
::
OpenGLWindow
(
Window
*
pParent
)
:
OpenGLWindow
::
OpenGLWindow
(
Window
*
pParent
)
:
SystemChildWindow
(
pParent
,
0
),
SystemChildWindow
(
pParent
,
0
),
mpImpl
(
new
OpenGLWindowImpl
(
this
))
mpImpl
(
new
OpenGLWindowImpl
(
this
)),
mpRenderer
(
NULL
)
{
{
}
}
...
@@ -45,6 +46,12 @@ OpenGLContext* OpenGLWindow::getContext()
...
@@ -45,6 +46,12 @@ OpenGLContext* OpenGLWindow::getContext()
return
mpImpl
->
getContext
();
return
mpImpl
->
getContext
();
}
}
void
OpenGLWindow
::
Paint
(
const
Rectangle
&
)
{
if
(
mpRenderer
)
mpRenderer
->
update
();
}
void
OpenGLWindow
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
void
OpenGLWindow
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
{
{
Point
aPoint
=
rMEvt
.
GetPosPixel
();
Point
aPoint
=
rMEvt
.
GetPosPixel
();
...
@@ -53,4 +60,9 @@ void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
...
@@ -53,4 +60,9 @@ void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
SAL_WARN
(
"vcl.opengl"
,
aColor
.
GetColor
());
SAL_WARN
(
"vcl.opengl"
,
aColor
.
GetColor
());
}
}
void
OpenGLWindow
::
setRenderer
(
IRenderer
*
pRenderer
)
{
mpRenderer
=
pRenderer
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment