small question answer fast plz

is this (the parameters) correct ?

public void setArrays() {
    if (hasVerticles) {
    } else {
    if (hasNormals) {
    if (hasTexCoords) {
    if (hasColors) {

Can’t say, because I don’t know how you store your data.

Assuming everything is stored unpadded, vertices has three components, texture coordinates has two components and color has four components, all floats, then it looks correct.

what is unpadded ?
yes, i use 3 floats per vertex (x,y,z), 2 for texcoord (x,y), and 4 for color (r,g,b,a)

is there a situation where you need 4 floats per vertex or 3 per texcoord ?

Unpadded means there’s no “empty” data between two consecutive elements.

You can use the W-component of a vertex to easily extend a shadow volume towards infinity, and three texture coordinates is used with cubemaps and 3D textures.

you didn’t tell us how you defined your functions, so ther’s no way for us to know if the arguments are valid :stuck_out_tongue:


define my functions ?
vertex is a floatarray [x,y,z,x2,y2,z2…]
normal is a floatarray [x,y,t,x2,y2,z2…]
what do you mean by define ?

Not sure exactly what you are looking for, but it looks right except for the first if(hasVerticles) which I assume should be if (hasVertices). Are you actually having a problem of some kind?