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
1ca25043
Kaydet (Commit)
1ca25043
authored
Kas 04, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Kas 10, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
support rendering to memory device contexts on Windows
Change-Id: I91fdd429663fae76bfe17d37de86d118621cf160
üst
d9fff953
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+2
-0
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+25
-6
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
1ca25043
...
@@ -156,6 +156,7 @@ public:
...
@@ -156,6 +156,7 @@ public:
void
requestLegacyContext
();
void
requestLegacyContext
();
void
requestSingleBufferedRendering
();
void
requestSingleBufferedRendering
();
void
requestVirtualDevice
();
bool
init
(
vcl
::
Window
*
pParent
=
0
);
bool
init
(
vcl
::
Window
*
pParent
=
0
);
bool
init
(
SystemChildWindow
*
pChildWindow
);
bool
init
(
SystemChildWindow
*
pChildWindow
);
...
@@ -211,6 +212,7 @@ private:
...
@@ -211,6 +212,7 @@ private:
bool
mbInitialized
;
bool
mbInitialized
;
bool
mbRequestLegacyContext
;
bool
mbRequestLegacyContext
;
bool
mbUseDoubleBufferedRendering
;
bool
mbUseDoubleBufferedRendering
;
bool
mbRequestVirtualDevice
;
};
};
#endif
#endif
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
1ca25043
...
@@ -37,7 +37,8 @@ OpenGLContext::OpenGLContext():
...
@@ -37,7 +37,8 @@ OpenGLContext::OpenGLContext():
m_pChildWindow
(
NULL
),
m_pChildWindow
(
NULL
),
mbInitialized
(
false
),
mbInitialized
(
false
),
mbRequestLegacyContext
(
false
),
mbRequestLegacyContext
(
false
),
mbUseDoubleBufferedRendering
(
true
)
mbUseDoubleBufferedRendering
(
true
),
mbRequestVirtualDevice
(
false
)
{
{
}
}
...
@@ -77,6 +78,11 @@ void OpenGLContext::requestSingleBufferedRendering()
...
@@ -77,6 +78,11 @@ void OpenGLContext::requestSingleBufferedRendering()
mbUseDoubleBufferedRendering
=
false
;
mbUseDoubleBufferedRendering
=
false
;
}
}
void
OpenGLContext
::
requestVirtualDevice
()
{
mbRequestVirtualDevice
=
true
;
}
#if defined( _WIN32 )
#if defined( _WIN32 )
static
LRESULT
CALLBACK
WndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
WndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
...
@@ -182,7 +188,8 @@ bool WGLisExtensionSupported(const char *extension)
...
@@ -182,7 +188,8 @@ bool WGLisExtensionSupported(const char *extension)
}
}
}
}
bool
InitMultisample
(
PIXELFORMATDESCRIPTOR
pfd
,
int
&
rPixelFormat
,
bool
bUseDoubleBufferedRendering
)
bool
InitMultisample
(
PIXELFORMATDESCRIPTOR
pfd
,
int
&
rPixelFormat
,
bool
bUseDoubleBufferedRendering
,
bool
bRequestVirtualDevice
)
{
{
HWND
hWnd
=
NULL
;
HWND
hWnd
=
NULL
;
GLWindow
glWin
;
GLWindow
glWin
;
...
@@ -235,6 +242,11 @@ bool InitMultisample(PIXELFORMATDESCRIPTOR pfd, int& rPixelFormat, bool bUseDoub
...
@@ -235,6 +242,11 @@ bool InitMultisample(PIXELFORMATDESCRIPTOR pfd, int& rPixelFormat, bool bUseDoub
if
(
!
bUseDoubleBufferedRendering
)
if
(
!
bUseDoubleBufferedRendering
)
iAttributes
[
1
]
=
GL_FALSE
;
iAttributes
[
1
]
=
GL_FALSE
;
if
(
bRequestVirtualDevice
)
{
iAttributes
[
2
]
=
WGL_DRAW_TO_BITMAP_ARB
;
}
bool
bArbMultisampleSupported
=
true
;
bool
bArbMultisampleSupported
=
true
;
// First We Check To See If We Can Get A Pixel Format For 4 Samples
// First We Check To See If We Can Get A Pixel Format For 4 Samples
...
@@ -589,9 +601,7 @@ bool OpenGLContext::ImplInit()
...
@@ -589,9 +601,7 @@ bool OpenGLContext::ImplInit()
{
{
sizeof
(
PIXELFORMATDESCRIPTOR
),
sizeof
(
PIXELFORMATDESCRIPTOR
),
1
,
// Version Number
1
,
// Version Number
PFD_DRAW_TO_WINDOW
|
PFD_SUPPORT_OPENGL
,
PFD_SUPPORT_OPENGL
|
PFD_DOUBLEBUFFER
,
PFD_TYPE_RGBA
,
// Request An RGBA Format
PFD_TYPE_RGBA
,
// Request An RGBA Format
(
BYTE
)
32
,
// Select Our Color Depth
(
BYTE
)
32
,
// Select Our Color Depth
0
,
0
,
0
,
0
,
0
,
0
,
// Color Bits Ignored
0
,
0
,
0
,
0
,
0
,
0
,
// Color Bits Ignored
...
@@ -607,9 +617,18 @@ bool OpenGLContext::ImplInit()
...
@@ -607,9 +617,18 @@ bool OpenGLContext::ImplInit()
0
,
0
,
0
// Layer Masks Ignored
0
,
0
,
0
// Layer Masks Ignored
};
};
if
(
mbUseDoubleBufferedRendering
)
PixelFormatFront
.
dwFlags
|=
PFD_DOUBLEBUFFER
;
if
(
mbRequestVirtualDevice
)
PixelFormatFront
.
dwFlags
|=
PFD_DRAW_TO_BITMAP
;
else
PixelFormatFront
.
dwFlags
|=
PFD_DRAW_TO_WINDOW
;
// we must check whether can set the MSAA
// we must check whether can set the MSAA
int
WindowPix
=
0
;
int
WindowPix
=
0
;
bool
bMultiSampleSupport
=
InitMultisample
(
PixelFormatFront
,
WindowPix
,
mbUseDoubleBufferedRendering
);
bool
bMultiSampleSupport
=
InitMultisample
(
PixelFormatFront
,
WindowPix
,
mbUseDoubleBufferedRendering
,
mbRequestVirtualDevice
);
if
(
bMultiSampleSupport
&&
WindowPix
!=
0
)
if
(
bMultiSampleSupport
&&
WindowPix
!=
0
)
{
{
m_aGLWin
.
bMultiSampleSupported
=
true
;
m_aGLWin
.
bMultiSampleSupported
=
true
;
...
...
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