Jump to content

  • Log In with Google      Sign In   
  • Create Account

vertex alignment effect


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 JohnnyCode   Members   -  Reputation: 231

Like
0Likes
Like

Posted 05 April 2014 - 10:36 AM

On opengl webpage, it was mentioned that vertex attributes should be occpupying 4 bytes multiple, in the very bound buffer data, and if they don't they should be aligned this way in buffer. I have a vertex size of 32 bytes, but one attribute occupies 3 bytes.

 

I have this question- wheather vertex attribute alignment speeds up vertex buffer binding, or it speeds up drawing the buffer as well. I plan on making this 3 byte attribute 4 byte, and have the 4th component manifest other information, but I wonder wheather it will be the gain in drawing, or only in binding. 



Sponsor:

#2 TheChubu   Crossbones+   -  Reputation: 4415

Like
1Likes
Like

Posted 05 April 2014 - 04:40 PM

It will be padded to 4 bytes. So if your attribute is 3 byte or 4 bytes, it will perform the same probably. The issue would be if the driver didn't pad the attributes at all. If you're using OpenGL, remember it when you're messing with uniform blocks or shader storage, padding rules still apply and can alter your offsets.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS