I’m using gl-context 3.3 and have done some fairly simple drawing in 2d, using an orthographic projection. I’ve requested 4-component position attributes, but, so far only really used .x & .y. No problem, until I want to add the extra component, .z
No problem since sending vec2 data that has the components written as
(*GLfloat ) pos= glMapBufferRange(…)
pos[ 0 ] = (GLfloat ) vec2.x ;
pos[ 1 ] = (GLfloat ) vec2.y ;
pos[ 2 ] = (GLfloat ) 0.f ;
pos[ 3 ] = (GLfloat ) 1.f ;
works just fine, so, just plug in .z as
ptr[ 2 ] = (GLfloat ) z_var ;
Just … that it won’t work. The point vanishes. It’s used on_drag_point(), so it’s easy to test.
I’ve tested sizeOf(z_var) for any trouble. I’ve replaced the variable with other constant litteral values and fixed the var in a pointer, but nothing works except for the litteral constant 0.f.
I have no clue of what’s going on and where to look.