Sprite maths?

BlitzMax Forums/BlitzMax OpenGL Programming/Sprite maths?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

hello!

i am currently making my own ogl engine. in blitz3d, but using openGL :)

my question is: how to rotate sprites?

[they shouldn't face to the camera. they should be parallel to the near/far clip plane]

thats what i use for the camera:
	glLoadIdentity
	glScalef cam\zoom#, cam\zoom#, 1
	glRotatef cament\rx#, 1, 0, 0
	glRotatef 180 - cament\ry#, 0, 1, 0
	glRotatef cament\rz#, 0, 0, 1
	glTranslatef cament\x#, -cament\y#, -cament\z#


thats what i use for meshes
			glPushMatrix
			glTranslatef -e\x#, e\y#, e\z#
			glScalef e\sx#, e\sy#, e\sz#
			glRotatef e\rx#, 1, 0, 0
			glRotatef e\ry#, 0, 1, 0
			glRotatef e\rz#, 0, 0, 1
......
glpopmatrix


thank you for any help :)