Proof of concept: Löve3d( or gLöve :P )
Posted: Wed Nov 19, 2008 10:44 pm
Another project I'm working on is adding basic 3d functionality to Löve. It's basically just a proof of concept because I wanted to check how all the 3d to 2d transformation stuff is done. The functions are close to basic openGl, what's implemented yet is translation, rotation, scaling, basic lights, backface culling and matrix push and pop'ing. Functions to position text in 3d space are also available.
Here are some screenshots:
Current gl-alike commands:
I still need to fix some stuff and add more possibilities.
What's semi-done is frustrum culling which should fix some drawing errors with stuff that's off screen but still gets rendered.
Here's the .love for you to play around or take a look how it's done and maybe you can find a better solution for something .
Camera movement is wasd and the arrow keys, but notice that it's bugged, still working on it. ## Update ##
The camera movement was bugged because I accidently changed the order of matrix multiplications, which fucked up the result :C
Here's the fixed one
Here are some screenshots:
Current gl-alike commands:
Code: Select all
glSet( setting, val )
glGet( setting )
glEnable( setting )
glDisable( setting )
glGetMatrix()
glPush() / glPushMatrix()
glPop() / glPopMatrix()
glLoadIdentity()
glTransform( a, b, c ) / glTranslate( a, b, c )
glRotate( a, b, c, d )
glScale( a, b ,c )
glVertex( x, y, z )
glColor( r, g, b, a )
glString( pos, text, cl )
glBegin( type )
glEnd()
glFlush()
What's semi-done is frustrum culling which should fix some drawing errors with stuff that's off screen but still gets rendered.
Here's the .love for you to play around or take a look how it's done and maybe you can find a better solution for something .
Camera movement is wasd and the arrow keys, but notice that it's bugged, still working on it. ## Update ##
The camera movement was bugged because I accidently changed the order of matrix multiplications, which fucked up the result :C
Here's the fixed one