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
54c1fac0
Kaydet (Commit)
54c1fac0
authored
Kas 04, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Markus Mohrhard
Kas 10, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Fix creation of textures and wrong format
Change-Id: I9357b79b9f2e1e9506b83b40e35b882b4ee4cc37
üst
2fb4c6cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
salbmp.cxx
vcl/opengl/salbmp.cxx
+11
-6
No files found.
vcl/opengl/salbmp.cxx
Dosyayı görüntüle @
54c1fac0
...
...
@@ -34,7 +34,8 @@ static bool isValidBitCount( sal_uInt16 nBitCount )
}
OpenGLSalBitmap
::
OpenGLSalBitmap
()
:
mnTexture
(
0
)
:
mpContext
(
NULL
)
,
mnTexture
(
0
)
,
mbDirtyTexture
(
true
)
,
mnBits
(
0
)
,
mnBytesPerRow
(
0
)
...
...
@@ -368,7 +369,12 @@ GLuint OpenGLSalBitmap::CreateTexture()
if
(
!
mnTexture
)
glGenTextures
(
1
,
&
mnTexture
);
glBindTexture
(
GL_TEXTURE_2D
,
mnTexture
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
mnWidth
,
mnHeight
,
0
,
nFormat
,
nType
,
pData
);
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
1
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
mnTexWidth
,
mnTexHeight
,
0
,
nFormat
,
nType
,
pData
);
glBindTexture
(
GL_TEXTURE_2D
,
0
);
if
(
bAllocated
)
...
...
@@ -473,12 +479,11 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
case
16
:
pBuffer
->
mnFormat
=
BMP_FORMAT_16BIT_TC_MSB_MASK
;
pBuffer
->
maColorMask
=
ColorMask
(
0xf800
,
0x07e0
,
0x001f
);
break
;
case
24
:
pBuffer
->
mnFormat
=
BMP_FORMAT_24BIT_TC_
BGR
;
break
;
case
32
:
pBuffer
->
mnFormat
=
BMP_FORMAT_32BIT_TC_
ARGB
;
pBuffer
->
maColorMask
=
ColorMask
(
0x
00ff0000
,
0x0000ff00
,
0x000000ff
);
case
24
:
pBuffer
->
mnFormat
=
BMP_FORMAT_24BIT_TC_
RGB
;
break
;
case
32
:
pBuffer
->
mnFormat
=
BMP_FORMAT_32BIT_TC_
RGBA
;
pBuffer
->
maColorMask
=
ColorMask
(
0x
ff000000
,
0x00ff0000
,
0x0000ff00
);
break
;
}
// FIXME pBuffer->mnFormat |= BMP_FORMAT_BOTTOM_UP;
return
pBuffer
;
}
...
...
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