opengl fixes
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2fbcd250b6
commit
467c42bfe8
@ -500,15 +500,21 @@ public class Mesh {
|
||||
|
||||
|
||||
if(renderPipelineState.getInstanced()){
|
||||
GL45.glDrawElementsInstanced(GL_TRIANGLES, elementCount, GL_UNSIGNED_INT, 0, renderPipelineState.getInstanceCount());
|
||||
Globals.renderingEngine.checkError();
|
||||
if(elementCount > 0 ){
|
||||
GL45.glDrawElementsInstanced(GL_TRIANGLES, elementCount, GL_UNSIGNED_INT, 0, renderPipelineState.getInstanceCount());
|
||||
Globals.renderingEngine.checkError();
|
||||
}
|
||||
} else {
|
||||
if(useElementArray){
|
||||
GL11.glDrawElements(GL_TRIANGLES, elementCount, GL_UNSIGNED_INT, 0);
|
||||
Globals.renderingEngine.checkError();
|
||||
if(elementCount > 0){
|
||||
GL11.glDrawElements(GL_TRIANGLES, elementCount, GL_UNSIGNED_INT, 0);
|
||||
Globals.renderingEngine.checkError();
|
||||
}
|
||||
} else {
|
||||
GL11.glDrawArrays(GL_TRIANGLES, 0, elementCount);
|
||||
Globals.renderingEngine.checkError();
|
||||
if(elementCount > 0){
|
||||
GL11.glDrawArrays(GL_TRIANGLES, 0, elementCount);
|
||||
Globals.renderingEngine.checkError();
|
||||
}
|
||||
}
|
||||
}
|
||||
glBindVertexArray(0);
|
||||
|
||||
@ -11,7 +11,6 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.joml.Vector3d;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import annotations.BigDataTest;
|
||||
import annotations.FastTest;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user