8 reputation
4
bio website
location
age
visits member for 1 year, 11 months
seen Nov 23 '12 at 8:48

Jun
5
awarded  Popular Question
Nov
23
awarded  Editor
Nov
23
revised How to pass one float as four unsigned chars to shader by glVertexPointAttrib?
added 669 characters in body
Nov
23
comment How to pass one float as four unsigned chars to shader by glVertexPointAttrib?
Generally you are right, however I am currently working on VertexBufferObject class, and I want to store all vertex information in one array (array of structures approach), instead of couple of them. I will edit my question, to explain that to future readers
Nov
22
awarded  Student
Nov
22
awarded  Scholar
Nov
22
accepted How to pass one float as four unsigned chars to shader by glVertexPointAttrib?
Nov
22
comment How to pass one float as four unsigned chars to shader by glVertexPointAttrib?
Yes, you are right, I just understood that... Why do you think that is silly thought? I want to store all vertices information in one array and that way I will be using 50% less memory (compared to storing RGBA as 4 floats), is that wrong approach?
Nov
22
comment How to pass one float as four unsigned chars to shader by glVertexPointAttrib?
Hi, thank you for taking your time answering this question. Of course I understood that glVertexAttribPointer isn't doing any conversions for me, otherwise I wouldn't try to fit four bytes into one float. Problem was, that I believed that both int and float values "consisted" (in ver 2 and 3) of the same bits in memory, while they did not - they only had the same numerical values, that were stored differently. I just misunderstood what hex value shown in editor meant. Now I just understood that as I was preparing example to show what I meant ;)
Nov
22
asked How to pass one float as four unsigned chars to shader by glVertexPointAttrib?