glDrawElement issues

This commit is contained in:
Jonathan Fransson
2019-04-11 15:19:48 -06:00
parent 986176af56
commit 66ab6527fa
2 changed files with 6 additions and 6 deletions

View File

@@ -666,12 +666,12 @@ void RenderableSatellites::render(const RenderData& data, RendererTasks&) {
// Crashes in here
glBindVertexArray(_vertexArray);
//glDrawElements(GL_LINES,
// static_cast<GLsizei>(_indexBufferData.size()),
// GL_UNSIGNED_INT,
// 0);
//static_cast<unsigned int>(_indexBufferData.size()),
//GL_UNSIGNED_INT,
//0);
glDrawArrays(GL_LINES,
0,
static_cast<unsigned int>(_indexBufferData.size()));
20); //static_cast<unsigned int>(_indexBufferData.size()));
glBindVertexArray(0);
_programObject->deactivate();
@@ -716,7 +716,7 @@ void RenderableSatellites::updateBuffers() {
}
++orbitindex;
}
glBindVertexArray(_vertexArray);
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);

View File

@@ -34,7 +34,7 @@ in vec4 viewSpacePosition;
Fragment getFragment() {
Fragment frag;
frag.color = vec4(color, opacity);
frag.color = vec4(0.0, 0.0, 0.5, opacity);
frag.depth = safeLength(viewSpacePosition);
frag.blend = BLEND_MODE_ADDITIVE;
frag.gPosition = viewSpacePosition;