ang_to_matrix and ang_for_matrix should help you out (they should be in the next public beta release, which will hopefully be soon). If you want it earlier, that page has an explanation and shows you what the algorithm is, but it's obviously not a quaternion rotation matrix.
When you construct your own quaternion rotation matrix, do you apply it in the shader? If you're making your own worldViewProj matrix you might be trying to render things in the view frustum that normally aren't, which won't work. As long as you are constructing your quaternion rotation matrix correctly, ang_to_matrix and ang_for_matrix should solve your problems.
HOWEVER!!
Also in that update will be
ang_for_axis, which will largely make custom quaternion work redundant. You might find having your own quaternion representation useful
anyway and use them in conjunction with ang_to/from_matrix.
I have my own quaternion representation that's a few years old now, somewhere in Lite-C Contributions, probably. I was going to resurrect it until I saw ang_for_axis in the upcoming update.
You usually shouldn't base the future of your project on the implementation of futures in a future beta version, but I doubt Conitec would've had trouble with those functions, and a couple of non-public betas have been released afterwards so I assume it's all going well.
I hope this is helpful

Jibb