Page 4 of 6

Re: Easy GL2D

Posted: Sat Feb 19, 2011 9:52 pm
by Izhido
Yeah. 512KB should be enough for anybody. :)

To be honest, I don't like the idea of integrating a library designed for a specific purpose, mixing various kinds of DS hardware, into libnds. The current model we have with, say, the WiFi lib, libfat, even libfilesystem, has worked just fine till now. I like the idea of GL2D as a separate, static library just like these ones. Hell, I would even like to see the current 3D API detached from libnds, so we can easily choose our favorite implementation...

Just my 2c .

Re: Easy GL2D

Posted: Sat Feb 19, 2011 11:58 pm
by zeromus
my vote is to rename functions to gl2dRelminatorsFunction and integrate it. I would rather help people use this than try to explain BG and OAM and vram mapping to them.

Re: Easy GL2D

Posted: Sun Feb 20, 2011 5:13 pm
by relminator
if GL2D gets integrated, I'll prolly just keep glSprite() for speed, and do a glSpriteRotateScale() that can be a generic function for all sprite needs so as not to pollute the global namespace.

What do you guys think?

Re: Easy GL2D

Posted: Mon Feb 21, 2011 12:53 pm
by eradsoft
Very interesting discussion: I´m getting lost
Just a small question to the authors:
To put sprites at different depths I asume you just has to say
glTraslate(0,0, whateverZyouwant);
glSprite(...)
Am I right???

Re: Easy GL2D

Posted: Mon Feb 21, 2011 1:54 pm
by WinterMute
Izhido wrote:Yeah. 512KB should be enough for anybody. :)

To be honest, I don't like the idea of integrating a library designed for a specific purpose, mixing various kinds of DS hardware, into libnds. The current model we have with, say, the WiFi lib, libfat, even libfilesystem, has worked just fine till now. I like the idea of GL2D as a separate, static library just like these ones. Hell, I would even like to see the current 3D API detached from libnds, so we can easily choose our favorite implementation...

Just my 2c .
There's nothing stopping you from using your favourite implementation now. That's the thing about libraries, the linker doesn't link in things you don't ask for. We could probably aim for more granularity in the libraries we have but libnds is still, at it's heart, a thin layer over the hardware.

One of the biggest problems we have with novice coders is that horrible third party libraries provide things that we currently don't have an implementation for, things like a reasonable API for making 2D games with the 3D hardware. For people just starting out choice is actually a bad thing, usually they don't have the experience to help them choose the right approach.

Re: Easy GL2D

Posted: Wed Feb 23, 2011 6:26 am
by relminator
eradsoft wrote:Very interesting discussion: I´m getting lost
Just a small question to the authors:
To put sprites at different depths I asume you just has to say
glTraslate(0,0, whateverZyouwant);
glSprite(...)
Am I right???
No. Depth management is handled automatically by the library. Just call glSprite() and you're good to go.

Re: Easy GL2D

Posted: Wed Feb 23, 2011 5:48 pm
by ENAY
Sorry about the delay. Urgent business came in over the weekend so I've been tied up on other things pretty much all week :(

I will try glDeleteTexture later and see what happens. Thanks for that Relminator. Looks like I still have a lot to learn.

Thanks for your interest Relminator :) I was only originally dabbling about on the DS for experimental purposes, but since I have been progressing well I may as well finish what I started. Once my game is done I may consider releasing it for free, need to check with my publisher first to see if that is actually ok or not since it is a conversion of one of my old PC games.

A few weeks ago I went to Osaka with my girlfriend and we visited the famous Osaka aquarium. Inside the building it had Nintendo DS wifi points set up all over the museum and simply standing by various numbered areas allowed you to download audio files to listen too. (As if you were using headphones) There were also pictures/texts maps etc of various things.

Very impressive stuff! I would love to know how they did that. :mrgreen:

Re: Easy GL2D

Posted: Sat Feb 26, 2011 7:29 pm
by defer
Nice library.
I've added glLoadOneTile() to load any tile, without the limitation on size that glLoadTileSet() has. Patch attached.

Also I was wondering why glLoadSpriteSet() and glLoadTileSet() are return the textureID. Is that of any use ?

Re: Easy GL2D

Posted: Mon Feb 28, 2011 8:00 am
by relminator
glLoadTileset() can load single tiles. Just use the same tilesize and bmpsize in your parameters and it would load a single tile.

You can use the returned textureID to delete your textures at runtime. ie. Dynamic textures.

Re: Easy GL2D

Posted: Tue Mar 01, 2011 3:19 am
by defer
relminator wrote:glLoadTileset() can load single tiles. Just use the same tilesize and bmpsize in your parameters and it would load a single tile.
Indeed (and it's obvious my new function doesn't add anything). I think I fixed another issue in my code at the same time I wrote that.
relminator wrote:You can use the returned textureID to delete your textures at runtime. ie. Dynamic textures.
Thanks.