0
我試圖在LWJGL中顯示一個點散射。但是,我無法找到LWJGL設置點大小或添加小精靈的方法。在LWJGL中調整點大小或設置點精靈
我在網上找到的教程都使用C++ OpenGL綁定。我無法弄清楚使用哪種方法。
這是調用渲染場景的方法。它必須以某種方式包含命令來設置點的大小。
public void loopCycle() {
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
GL20.glUseProgram(pId);
// Bind to the VAO that has all the information about the vertices
GL30.glBindVertexArray(vaoId);
GL20.glEnableVertexAttribArray(0);
GL20.glEnableVertexAttribArray(1);
// Draw the vertices and adjust size....
GL11.glDrawArrays(GL11.GL_POINTS, 0, vertexCount);
// Put everything back to default (deselect)
GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);
GL20.glDisableVertexAttribArray(0);
GL20.glDisableVertexAttribArray(1);
GL30.glBindVertexArray(0);
GL20.glUseProgram(0);
}