Login  Register

Re: MultiDrawElements

Posted by elect on Jan 14, 2016; 1:49pm
URL: https://forum.jogamp.org/MultiDrawElements-tp4036014p4036023.html

I don't see anything wrong there..

Anyway, just for curiosity, try

1)

private static final int[] ELEMENT_DATA = { // Note that we start from 0!
            0, 1, 3,
            1, 2, 3,
            0, 1, 3,
            1, 2, 3,
            0, 1, 3,
            1, 2, 3

    };

and pointbuffer = 0, 6*4, (6+6)*4

2) private static final int[] ELEMENT_DATA = { // Note that we start from 0!
            0, 1, 3,
            1, 2, 3

    };

and pointbuffer = 0

3) modify the first 4 colors

            1.0f, 0.0f, 0.0f, 1.0f,
            1.0f, 0.0f, 0.0f, 1.0f,
            1.0f, 0.0f, 0.0f, 1.0f,
            1.0f, 0.0f, 0.0f, 1.0f,

to

            1.0f, 0.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 0.0f, 1.0f, 1.0f,
            0.5f, 0.5f, 0.5f, 1.0f,

What you see?


Ps: do you catch any gl error?

Pps: is your whole code visible anywhere?