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
717ae7fb
Kaydet (Commit)
717ae7fb
authored
Ock 11, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Ock 29, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
I already know where the error is but want to be sure
Change-Id: Ibe90e99320243aadec2e2d8ab3740567e83f7f56
üst
c6d1ffb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+10
-0
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
717ae7fb
...
...
@@ -571,15 +571,21 @@ int OpenGLRender::RenderLine2FBO(int)
Line2DPointList
&
pointList
=
m_Line2DShapePointList
.
front
();
//fill vertex buffer
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_VertexBuffer
);
CHECK_GL_ERROR
();
glBufferData
(
GL_ARRAY_BUFFER
,
pointList
.
bufLen
,
pointList
.
pointBuf
,
GL_STATIC_DRAW
);
CHECK_GL_ERROR
();
// Use our shader
glUseProgram
(
m_Line2DProID
);
CHECK_GL_ERROR
();
glUniform4fv
(
m_Line2DColorID
,
1
,
&
m_Line2DColor
[
0
]);
CHECK_GL_ERROR
();
// 1rst attribute buffer : vertices
glEnableVertexAttribArray
(
m_Line2DVertexID
);
CHECK_GL_ERROR
();
glBindBuffer
(
GL_ARRAY_BUFFER
,
m_VertexBuffer
);
CHECK_GL_ERROR
();
glVertexAttribPointer
(
m_Line2DVertexID
,
// attribute. No particular reason for 0, but must match the layout in the shader.
2
,
// size
...
...
@@ -589,8 +595,12 @@ int OpenGLRender::RenderLine2FBO(int)
(
void
*
)
0
// array buffer offset
);
glDrawArrays
(
GL_LINE_STRIP
,
0
,
pointList
.
bufLen
/
sizeof
(
float
)
/
2
);
// 12*3 indices starting at 0 -> 12 triangles
CHECK_GL_ERROR
();
glDisableVertexAttribArray
(
m_Line2DWholeVertexID
);
CHECK_GL_ERROR
();
glUseProgram
(
0
);
CHECK_GL_ERROR
();
free
(
pointList
.
pointBuf
);
m_Line2DShapePointList
.
pop_front
();
free
(
pointList
.
pointBuf
);
}
...
...
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