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
8b384c94
Kaydet (Commit)
8b384c94
authored
Eyl 01, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
support legacy and core context on OSX
Change-Id: Ib8cadb3f182ce49c0ca8b6ccaa95960eb8e5f9ae
üst
6626d135
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
14 deletions
+39
-14
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+1
-1
sysdata.hxx
include/vcl/sysdata.hxx
+1
-0
salobj.cxx
vcl/osx/salobj.cxx
+30
-8
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+7
-5
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
8b384c94
...
@@ -181,7 +181,7 @@ public:
...
@@ -181,7 +181,7 @@ public:
bool
supportMultiSampling
()
const
;
bool
supportMultiSampling
()
const
;
static
SystemWindowData
generateWinData
(
Window
*
pParent
);
static
SystemWindowData
generateWinData
(
Window
*
pParent
,
bool
bRequestLegacyContext
);
private
:
private
:
SAL_DLLPRIVATE
bool
initWindow
();
SAL_DLLPRIVATE
bool
initWindow
();
...
...
include/vcl/sysdata.hxx
Dosyayı görüntüle @
8b384c94
...
@@ -178,6 +178,7 @@ struct SystemWindowData
...
@@ -178,6 +178,7 @@ struct SystemWindowData
#if defined( WNT ) // meaningless on Windows
#if defined( WNT ) // meaningless on Windows
#elif defined( MACOSX )
#elif defined( MACOSX )
bool
bOpenGL
;
// create a OpenGL providing NSView
bool
bOpenGL
;
// create a OpenGL providing NSView
bool
bLegacy
;
// create a 2.1 legacy context, only valid if bOpenGL == true
// Nothing
// Nothing
#elif defined( ANDROID )
#elif defined( ANDROID )
// Nothing
// Nothing
...
...
vcl/osx/salobj.cxx
Dosyayı görüntüle @
8b384c94
...
@@ -49,17 +49,39 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowDat
...
@@ -49,17 +49,39 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowDat
}
}
if
(
pWindowData
->
bOpenGL
)
if
(
pWindowData
->
bOpenGL
)
{
{
NSOpenGLPixelFormatAttribute
aAttributes
[]
=
NSOpenGLPixelFormat
*
pixFormat
=
NULL
;
if
(
pWindowData
->
bLegacy
)
{
NSOpenGLPixelFormatAttribute
aAttributes
[]
=
{
NSOpenGLPFADoubleBuffer
,
NSOpenGLPFAAlphaSize
,
8
,
NSOpenGLPFAColorSize
,
24
,
NSOpenGLPFAMultisample
,
NSOpenGLPFASampleBuffers
,
(
NSOpenGLPixelFormatAttribute
)
1
,
NSOpenGLPFASamples
,
(
NSOpenGLPixelFormatAttribute
)
4
,
0
};
pixFormat
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
aAttributes
];
}
else
{
{
NSOpenGLPFADoubleBuffer
,
NSOpenGLPixelFormatAttribute
aAttributes
[]
=
NSOpenGLPFAAlphaSize
,
8
,
{
NSOpenGLPFAColorSize
,
24
,
NSOpenGLPFAOpenGLProfile
,
NSOpenGLProfileVersion3_2Core
,
0
NSOpenGLPFADoubleBuffer
,
};
NSOpenGLPFAAlphaSize
,
8
,
NSOpenGLPFAColorSize
,
24
,
NSOpenGLPFAMultisample
,
NSOpenGLPFASampleBuffers
,
(
NSOpenGLPixelFormatAttribute
)
1
,
NSOpenGLPFASamples
,
(
NSOpenGLPixelFormatAttribute
)
4
,
0
};
pixFormat
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
aAttributes
];
}
NSOpenGLPixelFormat
*
pixFormat
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
aAttributes
];
maSysData
.
mpNSView
=
[[
NSOpenGLView
alloc
]
initWithFrame
:
aInitFrame
pixelFormat
:
pixFormat
];
maSysData
.
mpNSView
=
[[
NSOpenGLView
alloc
]
initWithFrame
:
aInitFrame
pixelFormat
:
pixFormat
];
}
}
else
else
{
{
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
8b384c94
...
@@ -615,7 +615,7 @@ bool OpenGLContext::initWindow()
...
@@ -615,7 +615,7 @@ bool OpenGLContext::initWindow()
{
{
if
(
!
m_pChildWindow
)
if
(
!
m_pChildWindow
)
{
{
SystemWindowData
winData
=
generateWinData
(
mpWindow
);
SystemWindowData
winData
=
generateWinData
(
mpWindow
,
false
);
m_pChildWindow
=
new
SystemChildWindow
(
mpWindow
,
0
,
&
winData
,
false
);
m_pChildWindow
=
new
SystemChildWindow
(
mpWindow
,
0
,
&
winData
,
false
);
m_pChildWindowGC
.
reset
(
m_pChildWindow
);
m_pChildWindowGC
.
reset
(
m_pChildWindow
);
}
}
...
@@ -642,7 +642,7 @@ bool OpenGLContext::initWindow()
...
@@ -642,7 +642,7 @@ bool OpenGLContext::initWindow()
{
{
if
(
!
m_pChildWindow
)
if
(
!
m_pChildWindow
)
{
{
SystemWindowData
winData
=
generateWinData
(
mpWindow
);
SystemWindowData
winData
=
generateWinData
(
mpWindow
,
mbRequestLegacyContext
);
m_pChildWindow
=
new
SystemChildWindow
(
mpWindow
,
0
,
&
winData
,
false
);
m_pChildWindow
=
new
SystemChildWindow
(
mpWindow
,
0
,
&
winData
,
false
);
m_pChildWindowGC
.
reset
(
m_pChildWindow
);
m_pChildWindowGC
.
reset
(
m_pChildWindow
);
}
}
...
@@ -673,7 +673,7 @@ bool OpenGLContext::initWindow()
...
@@ -673,7 +673,7 @@ bool OpenGLContext::initWindow()
bool
OpenGLContext
::
initWindow
()
bool
OpenGLContext
::
initWindow
()
{
{
const
SystemEnvData
*
pChildSysData
=
0
;
const
SystemEnvData
*
pChildSysData
=
0
;
SystemWindowData
winData
=
generateWinData
(
mpWindow
);
SystemWindowData
winData
=
generateWinData
(
mpWindow
,
false
);
if
(
winData
.
pVisual
)
if
(
winData
.
pVisual
)
{
{
if
(
!
m_pChildWindow
)
if
(
!
m_pChildWindow
)
...
@@ -725,11 +725,13 @@ bool OpenGLContext::initWindow()
...
@@ -725,11 +725,13 @@ bool OpenGLContext::initWindow()
#if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
#if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
SystemWindowData
OpenGLContext
::
generateWinData
(
Window
*
/*pParent*/
)
SystemWindowData
OpenGLContext
::
generateWinData
(
Window
*
/*pParent*/
,
bool
bRequestLegacyContext
)
{
{
(
void
)
bRequestLegacyContext
;
SystemWindowData
aWinData
;
SystemWindowData
aWinData
;
#if defined(MACOSX)
#if defined(MACOSX)
aWinData
.
bOpenGL
=
true
;
aWinData
.
bOpenGL
=
true
;
aWinData
.
bLegacy
=
bRequestLegacyContext
;
#endif
#endif
aWinData
.
nSize
=
sizeof
(
aWinData
);
aWinData
.
nSize
=
sizeof
(
aWinData
);
return
aWinData
;
return
aWinData
;
...
@@ -750,7 +752,7 @@ void initOpenGLFunctionPointers()
...
@@ -750,7 +752,7 @@ void initOpenGLFunctionPointers()
}
}
SystemWindowData
OpenGLContext
::
generateWinData
(
Window
*
pParent
)
SystemWindowData
OpenGLContext
::
generateWinData
(
Window
*
pParent
,
bool
)
{
{
SystemWindowData
aWinData
;
SystemWindowData
aWinData
;
aWinData
.
nSize
=
sizeof
(
aWinData
);
aWinData
.
nSize
=
sizeof
(
aWinData
);
...
...
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