nglVideo - an alternative to videoGL (update 2/17/11)

Got something cool to help make the toolchains better? Post it here.
Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (includes source)

Post by Discostew » Sat Jan 01, 2011 12:06 am

Sorry about being out of the loop as far as DS programming is concerned.

I noticed the "NOTE"s you had in your version, and I found it silly that I didn't even catch those when I was working on it before. Must have been since methods for storing textures and palette were somewhat similar. Anyways, doing my own tests, it seems that yes, the glDeleteTextures method is not working correctly. I'll see what I can do to get that working properly.

As far as integrating my version into libnds, it may be a little bit, but I have some time now, so after I get some of these other bugs out, I'll see what I can do.

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (includes source)

Post by Discostew » Sat Jan 01, 2011 8:48 pm

ok, I think I found and fixed the problem with the delete texture code, though the path leading to it was rather hectic. It was a bad link-up after making a block empty with _deallocateBlock, which was resolved and now shows no problems with my tests. Whether it fixes your problem, I don't know. I'll do some more testing to ensure what I see is doesn't break again, then I'll upload it and let you give it a try.

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (update 1/1/11)

Post by Discostew » Sat Jan 01, 2011 9:57 pm

Alright, library/example/src have been packaged, tested with latest devkitARM, and uploaded with mirror for those that can't access MediaFire (sorry for the long wait there). My testing has shown no problems, but I can't think of every possibly circumstance to test it, so it is available for you all to use and test.

azenris
Posts: 16
Joined: Thu Nov 26, 2009 5:44 pm

Re: nglVideo - an alternative to videoGL (update 1/1/11)

Post by azenris » Wed Jan 05, 2011 5:31 am

Not tested it with my game, but the tests I tried were fixed.

However in nglVideo.cpp, line:557 you have

texture->palIndex = (uint32)DynamicArrayGet( &nglGlob->deallocPal, nglGlob->deallocTexSize-- );

I'm guessing nglGlob->deallocTexSize should be nglGlob->deallocPalSize

I tink!

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (update 1/5/11)

Post by Discostew » Wed Jan 05, 2011 9:44 am

You're right. It's these little things that I miss when I'm thinking of the big picture. Fix has been added, and files re-uploaded. Gonna look though my code some time soon for any other potential problems, as well as possible improvements.

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (update 1/5/11)

Post by Discostew » Sun Jan 23, 2011 9:53 am

Alright, I did some optimizing and organizing of the code. As it is now, the actual library size now is around 38KB, almost half the size of this last version released. It is mainly due to it not being C++ anymore, as I have converted out of it.

However, rather than releasing it, I have been working on incorporating it into the latest libnds version. It compiles, and from the look of it, the libnds library is about 17KB bigger because of it. I have yet to do actual tests on it to ensure that it works, but it is late right now. I'll handle it sometime soon.

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: nglVideo - an alternative to videoGL (update 1/5/11)

Post by Discostew » Fri Jan 28, 2011 9:40 pm

Alright, I made a patch that has all the changes that incorporates my library into libnds, so while that is ready to be sent for review, I also assume that an example would be good to have. As it is right now, my testing project is an edited version of Paletted_Cube. I chose that because it had a multitude of texture types already, so I use it for testing, adding in a compressed texture, and simple use of glDeleteTextures, glColorTableEXT, and such.

If you wish for me to add an example to the patch, would you rather have me replace Paletted_Cube, or make my own project?

WinterMute
Site Admin
Posts: 1403
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: nglVideo - an alternative to videoGL (update 1/5/11)

Post by WinterMute » Wed Feb 09, 2011 4:26 pm

I've committed your patch and the modified Paletted Cube example to SVN now, as far as I can tell everything seems to be behaving well so far. The main thing to look at is the changes needed to Rel's easygl2d library http://devkitpro.org/viewtopic.php?f=25&t=2333
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest