I've got to say that this code has great potential - I'm hoping to explore it a little further and create a Python class 'pi3d' that provides simple 3D functions for kids to understand(!) such as ...dom wrote:Try here:
Looks great! - I'm amazed at what this little pi can dojmacey wrote:I do have a boost python wrapper for the desktop version of my OpenGL library http://nccastaff.bournemouth.ac.uk/jmac ... index.htmlI'm in the process of porting it to the pi at the moment using C++ but will at some stage build the python version as well. All it would then need is some python wrapping for EGL to create the windows (which should also be fairly easy) this is still a little way off tho as the c++ port is taking some time. You can see it in action here http://m.youtube.com/watch?v=Jr1XL11ogJ ... b=comments
Sounds like you've made a good start ... even the NeHe guy who wrote tutorials started out like that! It would be great to see some of your code for the pi. I'm certainly no expert!Gibble wrote:I've been having a fiddle with Python and OpenGLES 2.0 from the code linked above (I know neither). I've managed to get basic stuff like a cube displaying with a basic texture, and perspective, rotation, translation matrices working. I'm sure there's lots of bugs in my stuff though, as I'm not confident in what I'm doing. Half the fun though!
I did get stuck trying to get numpy arrays working for vertices when passing to OpenGLES if anyone gets that far, I'd be interested (I think somewhere its going astray with floats vs eglfloats, or array alignments etc, it draws but coordinates are out).
If anyone else is fluffing about in the same area, I'm happy to try and help out or contribute etc, although my knowledge is a bit limited.
Hiya, just wanted to say I've had a quick play with this, and works great. Nice to get something up and looking good without problems, and makes sense for someone like me. There's quite a lot more bits than I had figured out myself, so I suspect I may end up playing more with your code than my own mess . Good for me to learn it though!tipam wrote:Made some code for the 'pi3d' module to demonstrate simple 3D programming. It includes all the support files provided by Peter de Rivaz so it should just up and run in Python.
You can get it from http://www.github.com/tipam/pi3d
boxtest.py demonstrates the simple programming bit and implements the pi3d module.
I need to write a specification for pi3d to make 3D programming as easy-peasy as possible ... yet make it a lot of fun and productive.