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
690de8a3
Kaydet (Commit)
690de8a3
authored
Eki 31, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
first step at optional single buffered OpenGL rendering
Change-Id: I064de6ca7d40b8e6e378a01dd39a6cd09f040b68
üst
4ec36db0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+2
-0
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+17
-4
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
690de8a3
...
...
@@ -155,6 +155,7 @@ public:
~
OpenGLContext
();
void
requestLegacyContext
();
void
requestSingleBufferedRendering
();
bool
init
(
vcl
::
Window
*
pParent
=
0
);
bool
init
(
SystemChildWindow
*
pChildWindow
);
...
...
@@ -207,6 +208,7 @@ private:
boost
::
scoped_ptr
<
SystemChildWindow
>
m_pChildWindowGC
;
bool
mbInitialized
;
bool
mbRequestLegacyContext
;
bool
mbUseDoubleBufferedRendering
;
};
#endif
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
690de8a3
...
...
@@ -36,7 +36,8 @@ OpenGLContext::OpenGLContext():
mpWindow
(
NULL
),
m_pChildWindow
(
NULL
),
mbInitialized
(
false
),
mbRequestLegacyContext
(
false
)
mbRequestLegacyContext
(
false
),
mbUseDoubleBufferedRendering
(
true
)
{
}
...
...
@@ -71,6 +72,11 @@ void OpenGLContext::requestLegacyContext()
mbRequestLegacyContext
=
true
;
}
void
OpenGLContext
::
requestSingleBufferedRendering
()
{
mbUseDoubleBufferedRendering
=
false
;
}
#if defined( _WIN32 )
static
LRESULT
CALLBACK
WndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -213,6 +219,7 @@ bool InitMultisample(PIXELFORMATDESCRIPTOR pfd, int& rPixelFormat)
// We Support Multisampling On This Hardware.
int
iAttributes
[]
=
{
WGL_DOUBLE_BUFFER_ARB
,
GL_TRUE
,
WGL_DRAW_TO_WINDOW_ARB
,
GL_TRUE
,
WGL_SUPPORT_OPENGL_ARB
,
GL_TRUE
,
WGL_ACCELERATION_ARB
,
WGL_FULL_ACCELERATION_ARB
,
...
...
@@ -220,12 +227,14 @@ bool InitMultisample(PIXELFORMATDESCRIPTOR pfd, int& rPixelFormat)
WGL_ALPHA_BITS_ARB
,
8
,
WGL_DEPTH_BITS_ARB
,
24
,
WGL_STENCIL_BITS_ARB
,
0
,
WGL_DOUBLE_BUFFER_ARB
,
GL_TRUE
,
WGL_SAMPLE_BUFFERS_ARB
,
GL_TRUE
,
WGL_SAMPLES_ARB
,
8
,
0
,
0
};
if
(
!
mbUseDoubleBufferedRendering
)
iAttributes
[
1
]
=
GL_FALSE
;
bool
bArbMultisampleSupported
=
true
;
// First We Check To See If We Can Get A Pixel Format For 4 Samples
...
...
@@ -370,7 +379,7 @@ int oglErrorHandler( Display* /*dpy*/, XErrorEvent* /*evnt*/ )
}
#ifdef DBG_UTIL
GLXFBConfig
*
getFBConfig
(
Display
*
dpy
,
Window
win
,
int
&
nBestFBC
)
GLXFBConfig
*
getFBConfig
(
Display
*
dpy
,
Window
win
,
int
&
nBestFBC
,
bool
bUseDoubleBufferedRendering
)
{
if
(
dpy
==
0
||
!
glXQueryExtension
(
dpy
,
NULL
,
NULL
)
)
return
NULL
;
...
...
@@ -395,6 +404,10 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC)
GLX_X_VISUAL_TYPE
,
GLX_TRUE_COLOR
,
None
};
if
(
!
bUseDoubleBufferedRendering
)
visual_attribs
[
1
]
=
False
;
int
fbCount
=
0
;
GLXFBConfig
*
pFBC
=
glXChooseFBConfig
(
dpy
,
screen
,
...
...
@@ -530,7 +543,7 @@ bool OpenGLContext::ImplInit()
if
(
glXCreateContextAttribsARB
&&
!
mbRequestLegacyContext
)
{
int
best_fbc
=
-
1
;
GLXFBConfig
*
pFBC
=
getFBConfig
(
m_aGLWin
.
dpy
,
m_aGLWin
.
win
,
best_fbc
);
GLXFBConfig
*
pFBC
=
getFBConfig
(
m_aGLWin
.
dpy
,
m_aGLWin
.
win
,
best_fbc
,
mbUseDoubleBufferedRendering
);
if
(
!
pFBC
)
return
false
;
...
...
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