• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Vertex format in specific order?

C

CruelBus

Guest
Can I create a vertex format in any particular order, so long as the following tris are defined in that order?
ALSO: can I delete the format immediately after freezing the buffer or must it be kept until the buffer is no longer needed?

All of the tutorials I have seen declare the format in the following order:
Code:
vertex_format_begin();
    vertex_format_add_position();
    vertex_format_add_texcoord();
    vertex_format_add_color();
var VFORM=vertex_format_end();
But for... reasons... I'd just like to have it be texcoord, position, color since that's how I have built the arrays that draw the tris.
 
Yes, you can order them whichever way you like. I'd assume the tutorials follow that same order due to familiarity with the default functions.

In terms of deleting the format, that's something I'm not familiar with, nor have ever considered.
 
C

CruelBus

Guest
So it turns out that I can NOT delete the FORMAT until I'm done using the buffer.
Otherwise, returns error: Invalid Vertex Format
 
Top