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
33c8b164
Kaydet (Commit)
33c8b164
authored
Şub 08, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Şub 09, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add a few more debug statements
Change-Id: I9c9f4f216f1505d66911cfcf049eb991fbe59ccf
üst
ec4b0ed8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+12
-1
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
33c8b164
...
@@ -1423,9 +1423,12 @@ int OpenGLRender::RenderTextShape()
...
@@ -1423,9 +1423,12 @@ int OpenGLRender::RenderTextShape()
MoveModelf
(
trans
,
angle
,
scale
);
MoveModelf
(
trans
,
angle
,
scale
);
m_MVP
=
m_Projection
*
m_View
*
m_Model
;
m_MVP
=
m_Projection
*
m_View
*
m_Model
;
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_VertexBuffer
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_VertexBuffer
);
CHECK_GL_ERROR
();
glBufferData
(
GL_ARRAY_BUFFER
,
sizeof
(
textInfo
.
vertex
),
textInfo
.
vertex
,
GL_STATIC_DRAW
);
glBufferData
(
GL_ARRAY_BUFFER
,
sizeof
(
textInfo
.
vertex
),
textInfo
.
vertex
,
GL_STATIC_DRAW
);
CHECK_GL_ERROR
();
glUseProgram
(
m_TextProID
);
glUseProgram
(
m_TextProID
);
CHECK_GL_ERROR
();
glUniformMatrix4fv
(
m_TextMatrixID
,
1
,
GL_FALSE
,
&
m_MVP
[
0
][
0
]);
glUniformMatrix4fv
(
m_TextMatrixID
,
1
,
GL_FALSE
,
&
m_MVP
[
0
][
0
]);
// 1rst attribute buffer : vertices
// 1rst attribute buffer : vertices
glEnableVertexAttribArray
(
m_TextVertexID
);
glEnableVertexAttribArray
(
m_TextVertexID
);
...
@@ -1439,6 +1442,7 @@ int OpenGLRender::RenderTextShape()
...
@@ -1439,6 +1442,7 @@ int OpenGLRender::RenderTextShape()
(
void
*
)
0
// array buffer offset
(
void
*
)
0
// array buffer offset
);
);
//tex coord
//tex coord
CHECK_GL_ERROR
();
glEnableVertexAttribArray
(
m_TextTexCoordID
);
glEnableVertexAttribArray
(
m_TextTexCoordID
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_TextTexCoordBuf
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_TextTexCoordBuf
);
glVertexAttribPointer
(
glVertexAttribPointer
(
...
@@ -1450,15 +1454,22 @@ int OpenGLRender::RenderTextShape()
...
@@ -1450,15 +1454,22 @@ int OpenGLRender::RenderTextShape()
(
void
*
)
0
// array buffer offset
(
void
*
)
0
// array buffer offset
);
);
//texture
//texture
CHECK_GL_ERROR
();
glBindTexture
(
GL_TEXTURE_2D
,
textInfo
.
texture
);
glBindTexture
(
GL_TEXTURE_2D
,
textInfo
.
texture
);
CHECK_GL_ERROR
();
glUniform1i
(
m_TextTexID
,
0
);
glUniform1i
(
m_TextTexID
,
0
);
CHECK_GL_ERROR
();
//TODO: moggi: get rid fo GL_QUADS
//TODO: moggi: get rid fo GL_QUADS
glDrawArrays
(
GL_QUADS
,
0
,
4
);
glDrawArrays
(
GL_QUADS
,
0
,
3
);
CHECK_GL_ERROR
();
glDisableVertexAttribArray
(
m_TextTexCoordID
);
glDisableVertexAttribArray
(
m_TextTexCoordID
);
CHECK_GL_ERROR
();
glDisableVertexAttribArray
(
m_TextVertexID
);
glDisableVertexAttribArray
(
m_TextVertexID
);
CHECK_GL_ERROR
();
glBindTexture
(
GL_TEXTURE_2D
,
0
);
glBindTexture
(
GL_TEXTURE_2D
,
0
);
glUseProgram
(
0
);
glUseProgram
(
0
);
glDeleteTextures
(
1
,
&
textInfo
.
texture
);
glDeleteTextures
(
1
,
&
textInfo
.
texture
);
CHECK_GL_ERROR
();
m_TextInfoList
.
pop_front
();
m_TextInfoList
.
pop_front
();
}
}
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