chg Posted January 8, 2016 Share Posted January 8, 2016 Not sure if I might check out Babylon.js more in the future or not, but I'm kind of curious I guess, does Babylon.js interleave vertex attributes on meshes automatically? I'll admit I don't know the cost of not interleaving attributes on modern hardware, and imagine it's not that bad even on mobile; but it just seems shocking and lazy to me for JS engines not to do things the right way™ for reasons I don't understand (Javascript elegance?) Note: italics and TM symbol are my way of trying to acknowledge that I'm probably being stupid with this, ie. plz don't take this too seriously Quote Link to comment Share on other sites More sharing options...
jerome Posted January 8, 2016 Share Posted January 8, 2016 I guess you are talking about the (VNCVNC...) approach here : https://www.opengl.org/wiki/Vertex_Specification_Best_Practices Unless it's done at some higher level in the code, I'm not sure it is the way BJS uses : https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.engine.ts#L1027 DK would probably answer better than me to this question. chg 1 Quote Link to comment Share on other sites More sharing options...
chg Posted January 8, 2016 Author Share Posted January 8, 2016 Thanks Jerome! Looking at that code it looks like it might be supported var offset = 0; for (var index = 0; index < vertexDeclaration.length; index++) { var order = effect.getAttributeLocation(index); if (order >= 0) { this._gl.vertexAttribPointer(order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset); } offset += vertexDeclaration[index] * 4; Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 9, 2016 Share Posted January 9, 2016 @chg - you're bored, aren't you? (just kidding around). But also, the primary authors of the BabylonJS framework... are excellently kind. So, grab that engine.js and hack that puppy until it does what you want, and even put your name on it afterwards! (Even though you'll know you owe some creds.) heh The point is... its open source, its JS, just whack it into doing whatever you want it to do. That's the delicious part. And we got cool collab in our forum, too, eh? "Not sure if I might check out Babylon.js more in the future or not" @chg - help a few forum users... by fixing their playgrounds, and in 90 days... we'll own you. You'll be so addicted to BJS that you'll never look back. I think you'd make an excellent framework hacker/devver, chg. I think you should just stick around with us, and help us torture stuff and blow stuff up. jerome 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.