Page 2 of 2
Re: nglVideo - an alternative to videoGL (includes source)
Posted: Sat Jan 01, 2011 12:06 am
by Discostew
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.
Re: nglVideo - an alternative to videoGL (includes source)
Posted: Sat Jan 01, 2011 8:48 pm
by Discostew
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.
Re: nglVideo - an alternative to videoGL (update 1/1/11)
Posted: Sat Jan 01, 2011 9:57 pm
by Discostew
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.
Re: nglVideo - an alternative to videoGL (update 1/1/11)
Posted: Wed Jan 05, 2011 5:31 am
by azenris
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!
Re: nglVideo - an alternative to videoGL (update 1/5/11)
Posted: Wed Jan 05, 2011 9:44 am
by Discostew
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.
Re: nglVideo - an alternative to videoGL (update 1/5/11)
Posted: Sun Jan 23, 2011 9:53 am
by Discostew
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.
Re: nglVideo - an alternative to videoGL (update 1/5/11)
Posted: Fri Jan 28, 2011 9:40 pm
by Discostew
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?
Re: nglVideo - an alternative to videoGL (update 1/5/11)
Posted: Wed Feb 09, 2011 4:26 pm
by WinterMute
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