jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

piNGL on google code

Tue Jun 19, 2012 5:27 pm

I've finally uploaded all my 3D graphics library to google code http://code.google.com/p/pingl/

I've only uploaded the library at present but will add more demo programs once I get a chance, at present it seems to work ok for most things, I do however need to complete the Text rendering (using freetype to read the glyphs but this is still work in progress).

I have several demos using SDL as the main mouse / kbd library and will try and write up in more detail about this later this week

Jon

robotfunk
Posts: 45
Joined: Wed May 30, 2012 7:28 pm

Re: piNGL on google code

Tue Jun 19, 2012 6:34 pm

thanks, all I had to do before make was create /obj and /lib directories

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: piNGL on google code

Tue Jun 19, 2012 9:05 pm

that's strange I will check the branch and make sure I add them (they were most likely empty when I created the initial branch)

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: piNGL on google code

Tue Jun 19, 2012 9:09 pm

it seems this is a "know feature" of git (I usually use bzr) I fixed it by adding some empty .gitignore files to the directories (see this http://stackoverflow.com/questions/1159 ... repository)

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: piNGL on google code

Sat Jun 23, 2012 9:08 pm

Awesome. Thank you very much. Some (minor) things I ran into:

- Following your instructions in the README, I had to change (apt-get install) 'boost-dev' to 'libboost-dev' because: 'E: Unable to locate package boost-dev' (I just blindly copy/pasted, so I deserved that one).
- Mouse.h and Mouse.cpp are missing in the git-repo, causing an error building EGLWindow. I copied them over from your pre-built pingl image (pingl.tgz). That worked, libNGL.so compiled.
- In the ObjDemo and ParticleFactory Makefiles, you left a 'hard path' to your 'jmacey' homedir. See LDFLAGS. Changing that built the 2 demos.
- When starting ObjDemo or ParticleFactory, I just get a black screen. In LXDE, it takes some time to load, and fiddling with the mouse to get to the fullscreen ObjDemo. Sweet! I guess it only runs under X?
- ObjDemo is really smooth. ParticleFactory not so much (~3fps or so). I do get some 'Shader compile failed or had warnings'. I vaguely remember you mentioning something about the slow particles elsewhere, but I could be wrong.

Anyway, I just came in to say thanks. This has been (and I'm sure will continue to be) a great learning experience.

Edit: reading this topic: http://www.raspberrypi.org/phpBB3/viewt ... =68&t=8341 where you work on the keyboard and mouse. You also mention not using X. Hmm...

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: piNGL on google code

Sun Jun 24, 2012 8:23 am

Thanks for the feedback, glad your finding it useful.

The Mouse.cpp / h files are no longer needed as I decided to let SDL do the hard work, if you pull the latest branch it should update the EGLWindow class to remove all the code. There are also a number of posts on how this was all designed on my blog http://jonmacey.blogspot.co.uk/2012/06/ ... onfig.html

I will fix the instructions about boost (on the latest wheezy build it is stored as libboost-dev but will add a note about how to get it) as well as the Makefile.

Generally I run everything from the console (boot one) and it works ok, some of the demos will take a little time to run due to slow I/O, also you will benefit if you switch to the boot image with the 128/128 memory split as the primitives take quite a lot of GPU memory.

The shader warning is a bug in my code (well actually for some reason the shader log returns a 1 and not a 0 when there are no errors but I get this on most platforms so I presume it's my fault. I will investigate more and try and fix it)

The particle factory demo is slow as I think I'm hitting some cache or CPU limit. It is written very naively to demonstrate certain principles to my students, on the desktop (max book pro) I can get 10,000 particles before this happens. I will attempt at some stage to write a more efficient one, demonstrating the techniques required when you have limited memory / cache, this is usually not quite so pretty code wise, but that's part of the fun of the pi that you can teach techniques that usually you would require more expensive hardware to do (such as xbox dev kits etc).

User avatar
avatar1337
Posts: 78
Joined: Sun Jan 27, 2013 3:14 pm

Re: piNGL on google code

Tue Feb 19, 2013 11:39 pm

This is some good stuff :D What's the license it is released under =)

My engine (on the right) isn't as good -_-
The creator of the Raspberry Pi Configuration Manager (PiCon)

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: piNGL on google code

Wed Feb 20, 2013 7:15 am

It's under GPL feel free to use it but let me know what you use it for so I can add it to the list on the website.

I've not had a chance to update things lately as it's term time but will have some changes / bug fixes to add soon from my main desktop branch

Return to “OpenGLES”