Page 1 of 1

how to do multitexturing?

Posted: Sun Nov 10, 2013 1:16 am
by t377y000
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);

Re: how to do multitexturing?

Posted: Sun Dec 15, 2013 3:18 am
by zeromus
there is no multitexturing support on the NDS