Modified the multi-slot buffer support to work even
if the buffer is not instanced. Saw no real reason not to and it makes buffer support more flexible.
This commit is contained in:
parent
216f874175
commit
e76e770d17
@ -2226,7 +2226,6 @@ public class LwjglRenderer implements Renderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int slotsRequired = 1;
|
|
||||||
if (vb.isInstanced()) {
|
if (vb.isInstanced()) {
|
||||||
if (!ctxCaps.GL_ARB_instanced_arrays
|
if (!ctxCaps.GL_ARB_instanced_arrays
|
||||||
|| !ctxCaps.GL_ARB_draw_instanced) {
|
|| !ctxCaps.GL_ARB_draw_instanced) {
|
||||||
@ -2234,7 +2233,10 @@ public class LwjglRenderer implements Renderer {
|
|||||||
+ "but not supported by the "
|
+ "but not supported by the "
|
||||||
+ "graphics hardware");
|
+ "graphics hardware");
|
||||||
}
|
}
|
||||||
if (vb.getNumComponents() > 4 && vb.getNumComponents() % 4 != 0) {
|
}
|
||||||
|
int slotsRequired = 1;
|
||||||
|
if (vb.getNumComponents() > 4) {
|
||||||
|
if (vb.getNumComponents() % 4 != 0) {
|
||||||
throw new RendererException("Number of components in multi-slot "
|
throw new RendererException("Number of components in multi-slot "
|
||||||
+ "buffers must be divisible by 4");
|
+ "buffers must be divisible by 4");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user