Yes, correct. If you want more control over the roll of the orientation you can pre-multiply it with a rotation around the z-axis.
If you were to do the same in a 3D modeling app, you would likely first extrude the shape and then orient it, though it's possible to first rotate the 2D shape and then extrude it along the matrix' z-vector component.
Not sure what you are trying to accomplish, but it seems to me you are extruding a shape along the z-axis and want to then orient it in the direction of some secondary vector? Does the image show a top-down view of what you are trying to do? If you want to rotate around the Y-axis on the XZ-plane, you can use the following matrix (with v being the normalized "extrusion direction"):
Most Image editors let you interpret an image's alpha-channel as a (paintable) greyscale image. I know Gimp, Photoshop and Photo-Paint allow you to do this.
Another method is to create a separate greyscale image that serves as an alpha-channel. You can use the DirectX Texture Tool to load the image into the alpha-channel of an RGBA image to combine the two.
If you've implemented your own handler-interface (the Session class) you shouldn't call session_start() outside of it (as you do in process_login.php), because this would circumvent your database handler and use the default serializer instead. It also would populate session_id which would cause the "if (!session_id())"-test to fail.
Make sure this is done for every request (a session start also implies a session-restart):
$session = new session();
$session->start_session('_s', $_SERVER["HTTPS"] != "on");
I'm not sure session_regenerate_id() properly uses whatever you have registered with session_set_save_handler. You may have to manually update the database entries that refer to the old id (at the end of start_session()).
What happens if you remove the session_regenerate_id() line altogether?
You can use the inverse of the m_pHeadBone matrix as a view matrix. This matrix lets you transform a scene into the local space of the head(-camera), as you effectively always do when multiplying by a view matrix.
They work similar to standard billboards, in that you want one specific vector of the billboard's orientation (say its y-axis) to always point in the direction of the camera. The difference is you also want the laser to keep pointing in the direction of its tangent line (say the z-axis). Because of this you only have the freedom to reorient the billboard around its z-axis. So towards whatever direction you re-orient the y-axis, it needs the be orthogonal in respect to the z-axis. You can do this by orthonormalizing the camera-vertex vector in respect to the tangent vector.
So the three vectors that form a billboard matrix' orthogonal base are:
I can't compile shaders online(because of hardware limitations), so i cannot generate dummy shader for each inputlayout...
Most practical method is to validate the input layout against an actual shader that uses the input layout.
When binding an input layout together with a vertex shader, the layout needs to have (validated) element for all the VS' input elements (matching in position and order). It can have additional element used by other shaders, but it can never omit elements required by the shader.
For example, if you have an input layout that's validated against a shader that uses the input elements [POSITION, NORMAL, UV], the layout can be used to feed the following shader input structs: [POSITION, NORMAL, UV] [POSITION, NORMAL] [POSITION] [-]. (You'd validate such an input layout against the shader that has the largest span of input elements.)