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
bb34de01
Kaydet (Commit)
bb34de01
authored
Kas 11, 2015
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move checkExtension() to a more private location
Change-Id: I9f8a4ca0991b59bb9b6af4d40e3136ce5c986731
üst
11fc639c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
38 deletions
+41
-38
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+1
-38
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+40
-0
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
bb34de01
...
@@ -72,43 +72,6 @@ class OpenGLTests;
...
@@ -72,43 +72,6 @@ class OpenGLTests;
/// Holds the information of our new child window
/// Holds the information of our new child window
struct
GLWindow
struct
GLWindow
{
{
// Copy of gluCheckExtension(), from the Apache-licensed
// https://code.google.com/p/glues/source/browse/trunk/glues/source/glues_registry.c
static
GLboolean
checkExtension
(
const
GLubyte
*
extName
,
const
GLubyte
*
extString
)
{
GLboolean
flag
=
GL_FALSE
;
char
*
word
;
char
*
lookHere
;
char
*
deleteThis
;
if
(
extString
==
nullptr
)
{
return
GL_FALSE
;
}
deleteThis
=
lookHere
=
static_cast
<
char
*>
(
malloc
(
strlen
(
reinterpret_cast
<
const
char
*>
(
extString
))
+
1
));
if
(
lookHere
==
nullptr
)
{
return
GL_FALSE
;
}
/* strtok() will modify string, so copy it somewhere */
strcpy
(
lookHere
,
reinterpret_cast
<
const
char
*>
(
extString
));
while
((
word
=
strtok
(
lookHere
,
" "
))
!=
nullptr
)
{
if
(
strcmp
(
word
,
reinterpret_cast
<
const
char
*>
(
extName
))
==
0
)
{
flag
=
GL_TRUE
;
break
;
}
lookHere
=
nullptr
;
/* get next token */
}
free
(
static_cast
<
void
*>
(
deleteThis
));
return
flag
;
}
#if defined( _WIN32 )
#if defined( _WIN32 )
HWND
hWnd
;
HWND
hWnd
;
HDC
hDC
;
HDC
hDC
;
...
@@ -129,7 +92,7 @@ struct GLWindow
...
@@ -129,7 +92,7 @@ struct GLWindow
GLXContext
ctx
;
GLXContext
ctx
;
GLXPixmap
glPix
;
GLXPixmap
glPix
;
bool
HasGLXExtension
(
const
char
*
name
)
{
return
checkExtension
(
reinterpret_cast
<
const
GLubyte
*>
(
name
),
reinterpret_cast
<
const
GLubyte
*>
(
GLXExtensions
)
);
}
bool
HasGLXExtension
(
const
char
*
name
)
const
;
const
char
*
GLXExtensions
;
const
char
*
GLXExtensions
;
#endif
#endif
unsigned
int
bpp
;
unsigned
int
bpp
;
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
bb34de01
...
@@ -665,7 +665,47 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen)
...
@@ -665,7 +665,47 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen)
return
ImplInit
();
return
ImplInit
();
}
}
// Copy of gluCheckExtension(), from the Apache-licensed
// https://code.google.com/p/glues/source/browse/trunk/glues/source/glues_registry.c
static
GLboolean
checkExtension
(
const
GLubyte
*
extName
,
const
GLubyte
*
extString
)
{
GLboolean
flag
=
GL_FALSE
;
char
*
word
;
char
*
lookHere
;
char
*
deleteThis
;
if
(
extString
==
nullptr
)
{
return
GL_FALSE
;
}
deleteThis
=
lookHere
=
static_cast
<
char
*>
(
malloc
(
strlen
(
reinterpret_cast
<
const
char
*>
(
extString
))
+
1
));
if
(
lookHere
==
nullptr
)
{
return
GL_FALSE
;
}
/* strtok() will modify string, so copy it somewhere */
strcpy
(
lookHere
,
reinterpret_cast
<
const
char
*>
(
extString
));
while
((
word
=
strtok
(
lookHere
,
" "
))
!=
nullptr
)
{
if
(
strcmp
(
word
,
reinterpret_cast
<
const
char
*>
(
extName
))
==
0
)
{
flag
=
GL_TRUE
;
break
;
}
lookHere
=
nullptr
;
/* get next token */
}
free
(
static_cast
<
void
*>
(
deleteThis
));
return
flag
;
}
bool
GLWindow
::
HasGLXExtension
(
const
char
*
name
)
const
{
return
checkExtension
(
reinterpret_cast
<
const
GLubyte
*>
(
name
),
reinterpret_cast
<
const
GLubyte
*>
(
GLXExtensions
)
);
}
bool
OpenGLContext
::
ImplInit
()
bool
OpenGLContext
::
ImplInit
()
{
{
...
...
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