gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DS Texture example with source for you

#60509 - LOst? - Fri Nov 11, 2005 6:07 am

I realized that no one has really explained how to get a texture to show up at this forum. So in hope more people will do as I do right now, and help more people to get somewhere, I here by post a working texture example with source code for the DS 3D mode:
http://www.kund.hemmanet.se/~lost/gamecub.zip

Screen shot:
http://www.kund.hemmanet.se/~lost/gc_ds.png


My hopes were to make the original Gamecube intro but for the DS (cube flips over to make the GC logo). I got this far by my own, but I lack of OpenGL knowledge. Just being able to do texture coordinates and produce texture data by my own took a long time (two days). It would have gone both faster and futher in this project if there was someone before me to give out texture examples. So instead I wish people to get the help I wanted by giving out an example with source myself.

If you can produce something out of this, I am happy to be of help.
/LOst
_________________
Exceptions are fun

#60556 - dovoto - Fri Nov 11, 2005 7:16 pm

You do realize there are many (8 or 9) texture examples included with libnds dont you? And that at least 7 of them are based off the very easy to follow Nehe OpenGL tutorial?

If there is something specificly lacking in these examples let me know and I will attempt to prove more clarity (although I am not entirely certain how that could be done).
_________________
www.drunkencoders.com

#60576 - LOst? - Fri Nov 11, 2005 10:43 pm

dovoto wrote:
You do realize there are many (8 or 9) texture examples included with libnds dont you? And that at least 7 of them are based off the very easy to follow Nehe OpenGL tutorial?

If there is something specificly lacking in these examples let me know and I will attempt to prove more clarity (although I am not entirely certain how that could be done).

I tried to find those examples from a site named Drunken Coders a few times. But for some reason the download wasn't directly linked to the thing I was looking for. No big as I figured out how to manage texutures by myself. I just want to help you know.
_________________
Exceptions are fun

#60579 - dovoto - Fri Nov 11, 2005 11:58 pm

hmm..well i feel like an ass.

Link has been updated on drunkencoders.com.

http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=159894

These examples are also installed if you use devkitpro web installer (you have to select them though)

*EDIT*
Actualy the old link was good but the example package was bumped down and you needed to click "examples" in the list. It would take you to a listing of all example project files including the ones for nds.
_________________
www.drunkencoders.com

#60581 - LOst? - Sat Nov 12, 2005 1:02 am

Ok. Thanks for the link.

Now do you know any way of rendering solid quads at the same time as texture quads?
_________________
Exceptions are fun

#60583 - dovoto - Sat Nov 12, 2005 1:28 am

hmm..yes but now that you say it I may not have an easy way to disable textures in the lib...let me look into it.
_________________
www.drunkencoders.com

#60584 - SevenString - Sat Nov 12, 2005 2:14 am

does "glDisable(GL_TEXTURE_2D);" not work?
_________________
"Artificial Intelligence is no match for natural stupidity."

#60586 - blaisef01 - Sat Nov 12, 2005 2:49 am

"glDisable(GL_TEXTURE_2D);" doesn't seem to work for me that just causes all sorts of pain and suffering but "glBindTexture(GL_TEXTURE_2D, 0);" does work, providing that your texture names start at 1. or alternatively call "GL_TEX_FORMAT = 0;"

it might not be GL_TEX_FORMAT but something like that look in video.h or videoGL.h to be sure..

#60621 - LOst? - Sun Nov 13, 2005 12:30 am

SevenString wrote:
does "glDisable(GL_TEXTURE_2D);" not work?

When I used glDisable, it disabled all the textures during the frame render. I want to have some quads textured and some just filled with colors.
_________________
Exceptions are fun

#76860 - Payk - Sat Mar 25, 2006 2:16 pm

nice one i have searched exactly for that thanx

#77118 - Payk - Tue Mar 28, 2006 12:02 pm

i worked ahead with that code and got another problem. is there a way to update a single texture without killng all other textures... or a way to map directly on that textures to draw on...??? can u help me LOst?