how to do multitexturing?

Post Reply
t377y000
Posts: 52
Joined: Wed Jun 02, 2010 3:14 am
Location: United States

how to do multitexturing?

Post by t377y000 » Sun Nov 10, 2013 1:16 am

hi anyone know how to do multitexturing in libnds/devkitarm?
for instance if i have the "texture" & the "normal". (for abit of bump mapping)

im using .pcx format textures. i know how to load 1 texture per model but..

Code: Select all

//texture
sImage watertexpcx;
loadPCX((u8*)watertex64_pcx, &watertexpcx);
image8to16(&watertexpcx);
glGenTextures( 1, &watertex64_texid ); glBindTexture( 0, watertex64_texid );
glTexImage2D(0, 0, GL_RGB, TEXTURE_SIZE_64, TEXTURE_SIZE_64, 0, TEXGEN_TEXCOORD, watertexpcx.image.data8);
imageDestroy(&watertexpcx);

//model
glPushMatrix();
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
	get_glPolyFormats();     //from "lighting handler.h"
	glTranslatef(0,0,160);	//glRotateX(-90);
	glScalef(10,10,10);
	get_glMats();              //from "lighting handler.h"
glBindTexture( 0, watertex64_texid );
glCallList((u32*)mappieceflat64_bin);
glPopMatrix(1);

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: how to do multitexturing?

Post by zeromus » Sun Dec 15, 2013 3:18 am

there is no multitexturing support on the NDS

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests