View unanswered posts | View active topics It is currently Fri Dec 15, 2017 1:09 pm



Reply to topic  [ 2 posts ] 
 how to do multitexturing? 
Author Message

Joined: Wed Jun 02, 2010 3:14 am
Posts: 52
Location: United States
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:
//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);


Sun Nov 10, 2013 1:16 am
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
there is no multitexturing support on the NDS


Sun Dec 15, 2013 3:18 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads