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
09298ccd
Kaydet (Commit)
09298ccd
authored
Ock 12, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Ock 29, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more clean-up
Change-Id: Ie774afc8ab2c881c5f82be286c84fb3eb37821c1
üst
394e8273
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+15
-14
OpenGLRender.hxx
chart2/source/view/main/OpenGLRender.hxx
+1
-1
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
09298ccd
...
...
@@ -615,13 +615,13 @@ void OpenGLRender::prepareToRender()
CreateRenderObj
(
m_iWidth
,
m_iHeight
);
//create fbo
CreateFrameBufferObj
();
if
(
m
_i
ArbMultisampleSupported
)
if
(
m
b
ArbMultisampleSupported
)
{
CreateMultiSampleFrameBufObj
();
}
}
//bind fbo
if
(
m
_i
ArbMultisampleSupported
)
if
(
m
b
ArbMultisampleSupported
)
{
glBindFramebuffer
(
GL_FRAMEBUFFER
,
m_frameBufferMS
);
}
...
...
@@ -638,7 +638,7 @@ void OpenGLRender::prepareToRender()
void
OpenGLRender
::
renderToBitmap
()
{
if
(
m
_i
ArbMultisampleSupported
)
if
(
m
b
ArbMultisampleSupported
)
{
GLenum
status
;
glBindFramebuffer
(
GL_FRAMEBUFFER
,
0
);
...
...
@@ -909,7 +909,7 @@ OpenGLRender::OpenGLRender(uno::Reference< drawing::XShape > xTarget):
m_iFboIdx
(
0
),
m_fLineAlpha
(
1.0
),
mxRenderTarget
(
xTarget
),
m
_i
ArbMultisampleSupported
(
false
),
m
b
ArbMultisampleSupported
(
false
),
m_TextVertexID
(
0
),
m_TextTexCoordID
(
1
),
m_ClearColor
(
glm
::
vec4
(
1.0
f
,
1.0
f
,
1.0
f
,
1.0
f
))
...
...
@@ -1038,22 +1038,22 @@ bool OpenGLRender::InitMultisample(PIXELFORMATDESCRIPTOR pfd)
//create a temp windwo to check whether support multi-sample, if support, get the format
if
(
InitTempWindow
(
&
hWnd
,
m_iWidth
,
m_iHeight
,
pfd
)
<
0
)
{
SAL_WARN
(
"chart2.opengl"
,
"Can't create temp window to test
\n
"
);
SAL_WARN
(
"chart2.opengl"
,
"Can't create temp window to test"
);
return
false
;
}
// See If The String Exists In WGL!
if
(
!
WGLisExtensionSupported
(
"WGL_ARB_multisample"
))
{
m
_i
ArbMultisampleSupported
=
false
;
SAL_WARN
(
"chart2.opengl"
,
"Device doesn't support multi sample
\n
"
);
m
b
ArbMultisampleSupported
=
false
;
SAL_WARN
(
"chart2.opengl"
,
"Device doesn't support multi sample"
);
return
false
;
}
// Get Our Pixel Format
PFNWGLCHOOSEPIXELFORMATARBPROC
wglChoosePixelFormatARB
=
(
PFNWGLCHOOSEPIXELFORMATARBPROC
)
wglGetProcAddress
(
"wglChoosePixelFormatARB"
);
if
(
!
wglChoosePixelFormatARB
)
{
m
_i
ArbMultisampleSupported
=
false
;
m
b
ArbMultisampleSupported
=
false
;
return
false
;
}
// Get Our Current Device Context
...
...
@@ -1087,39 +1087,39 @@ bool OpenGLRender::InitMultisample(PIXELFORMATDESCRIPTOR pfd)
// If We Returned True, And Our Format Count Is Greater Than 1
if
(
valid
&&
numFormats
>=
1
)
{
m
_i
ArbMultisampleSupported
=
true
;
m
b
ArbMultisampleSupported
=
true
;
m_iArbMultisampleFormat
=
pixelFormat
;
wglMakeCurrent
(
NULL
,
NULL
);
wglDeleteContext
(
glWin
.
hRC
);
ReleaseDC
(
hWnd
,
glWin
.
hDC
);
DestroyWindow
(
hWnd
);
return
m
_i
ArbMultisampleSupported
;
return
m
b
ArbMultisampleSupported
;
}
// Our Pixel Format With 4 Samples Failed, Test For 2 Samples
iAttributes
[
19
]
=
2
;
valid
=
wglChoosePixelFormatARB
(
hDC
,
iAttributes
,
fAttributes
,
1
,
&
pixelFormat
,
&
numFormats
);
if
(
valid
&&
numFormats
>=
1
)
{
m
_i
ArbMultisampleSupported
=
true
;
m
b
ArbMultisampleSupported
=
true
;
m_iArbMultisampleFormat
=
pixelFormat
;
wglMakeCurrent
(
NULL
,
NULL
);
wglDeleteContext
(
glWin
.
hRC
);
ReleaseDC
(
hWnd
,
glWin
.
hDC
);
DestroyWindow
(
hWnd
);
return
m
_i
ArbMultisampleSupported
;
return
m
b
ArbMultisampleSupported
;
}
// Return The Valid Format
wglMakeCurrent
(
NULL
,
NULL
);
wglDeleteContext
(
glWin
.
hRC
);
ReleaseDC
(
hWnd
,
glWin
.
hDC
);
DestroyWindow
(
hWnd
);
return
m
_i
ArbMultisampleSupported
;
return
m
b
ArbMultisampleSupported
;
}
#endif
bool
OpenGLRender
::
GetMSAASupport
()
{
return
m
_i
ArbMultisampleSupported
;
return
m
b
ArbMultisampleSupported
;
}
int
OpenGLRender
::
GetMSAAFormat
()
...
...
@@ -1415,6 +1415,7 @@ int OpenGLRender::RenderRectangleShape()
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
m_RectangleShapePointList
.
pop_front
();
}
CHECK_GL_ERROR
();
return
0
;
}
...
...
chart2/source/view/main/OpenGLRender.hxx
Dosyayı görüntüle @
09298ccd
...
...
@@ -270,7 +270,7 @@ private:
std
::
list
<
Line2DPointList
>
m_Line2DShapePointList
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShape
>
mxRenderTarget
;
bool
m
_i
ArbMultisampleSupported
;
bool
m
b
ArbMultisampleSupported
;
int
m_iArbMultisampleFormat
;
GLint
m_iSampleBufs
;
GLint
m_iSamples
;
...
...
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