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
6d6ba15f
Kaydet (Commit)
6d6ba15f
authored
Şub 15, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Şub 15, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix OpenGL text rendering
Change-Id: Ia5dd022d8b79d4276a92bcf741196137d5e9d36e
üst
eabba2d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+14
-1
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
6d6ba15f
...
@@ -221,6 +221,17 @@ GLint OpenGLRender::LoadShaders(const OUString& rVertexShaderName,const OUString
...
@@ -221,6 +221,17 @@ GLint OpenGLRender::LoadShaders(const OUString& rVertexShaderName,const OUString
return
ProgramID
;
return
ProgramID
;
}
}
namespace
{
GLfloat
texCoords
[]
=
{
0.0
f
,
0.0
f
,
1.0
f
,
0.0
f
,
1.0
f
,
1.0
f
,
0.0
f
,
1.0
f
};
}
int
OpenGLRender
::
InitOpenGL
(
GLWindow
aWindow
)
int
OpenGLRender
::
InitOpenGL
(
GLWindow
aWindow
)
{
{
glWin
=
aWindow
;
glWin
=
aWindow
;
...
@@ -318,10 +329,12 @@ int OpenGLRender::InitOpenGL(GLWindow aWindow)
...
@@ -318,10 +329,12 @@ int OpenGLRender::InitOpenGL(GLWindow aWindow)
glGenBuffers
(
1
,
&
m_RenderTexCoordBuf
);
glGenBuffers
(
1
,
&
m_RenderTexCoordBuf
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_RenderTexCoordBuf
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_RenderTexCoordBuf
);
glBufferData
(
GL_ARRAY_BUFFER
,
sizeof
(
texCoords
),
texCoords
,
GL_STATIC_DRAW
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
glGenBuffers
(
1
,
&
m_TextTexCoordBuf
);
glGenBuffers
(
1
,
&
m_TextTexCoordBuf
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_TextTexCoordBuf
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_TextTexCoordBuf
);
glBufferData
(
GL_ARRAY_BUFFER
,
sizeof
(
texCoords
),
texCoords
,
GL_STATIC_DRAW
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
#if defined( WNT )
#if defined( WNT )
...
@@ -1476,7 +1489,7 @@ int OpenGLRender::RenderTextShape()
...
@@ -1476,7 +1489,7 @@ int OpenGLRender::RenderTextShape()
glUniform1i
(
m_TextTexID
,
0
);
glUniform1i
(
m_TextTexID
,
0
);
CHECK_GL_ERROR
();
CHECK_GL_ERROR
();
//TODO: moggi: get rid fo GL_QUADS
//TODO: moggi: get rid fo GL_QUADS
glDrawArrays
(
GL_QUADS
,
0
,
3
);
glDrawArrays
(
GL_QUADS
,
0
,
4
);
CHECK_GL_ERROR
();
CHECK_GL_ERROR
();
glDisableVertexAttribArray
(
m_TextTexCoordID
);
glDisableVertexAttribArray
(
m_TextTexCoordID
);
CHECK_GL_ERROR
();
CHECK_GL_ERROR
();
...
...
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