Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Texture problem Date: 29 Jul 1998 08:26:38 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 111 Message-ID: <01bdbaca$456a5ac0$f30b0a0a@Angela1.intelligent-group.com> References: <35BDDB53.81B9EE38@hi.is> <01bdba39$e36cc320$f30b0a0a@Angela1.intelligent-group.com> <35BDF21A.A4F69B0@hi.is> <6plfss$3ue10@chuka.playstation.co.uk> NNTP-Posting-Host: d2-s34-137-telehouse.mistral.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Carlos Pieterse wrote in article <6plfss$3ue10@chuka.playstation.co.uk>... > Hi Ari Pall, > > >Ok, now I'm using a functions from a demo that came with the CodeWarrior 2. > >First > >I call the "void ProperInitialiseTexture (long address, GsIMAGE* > imageInfo)" > > > ???? (this means nothing, could be almost anything) But in fact it probably means this (a generic TIM image loader function): void ProperInitialiseTexture (long address, GsIMAGE* imageInfo) { RECT rect; GsIMAGE temp; // If we've not specified an image info structure, we're not // going to re-use the information (probably a texture for a 3D model) // so we use a local to stand in for it. if(imageInfo==NULL) imageInfo=&temp; // +4 because we need to skip head of TIM file GsGetTimInfo( (u_long *)(address+4), imageInfo); dumpIMAGE(imageInfo); rect.x = imageInfo->px; rect.y = imageInfo->py; rect.w = imageInfo->pw; rect.h = imageInfo->ph; LoadImage( &rect, imageInfo->pixel); DrawSync(0); // if image needs a CLUT, load it up // (pmode: 8 or 9 ==> texture is 4-bit or 8-bit) if ( (imageInfo->pmode>>3)&0x01) { rect.x = imageInfo->cx; rect.y = imageInfo->cy; rect.w = imageInfo->cw; rect.h = imageInfo->ch; LoadImage( &rect, imageInfo->clut); DrawSync(0); } // wait for loading to finish } > >function > >and then there is another function called > >"u_short SortSpriteObjectPosition (ObjectHandler* object)" > ???? (this too means nothing ... -sort of out of context) Yeah, let's lose that one.... > >witch I'm not sure what to do with.. (the example, states it's not ready). > > > What ?? > > >I would appriciate if somebody would send me some samplecode, so I could > fix > >my > >errors. > >(I always see "something" on the 3d models, but that's always something > >strange. I store > >the .tim file at (640,0) in the VRAM, that is outside the frame buffers.) > > > Errrm... Well actually it is in the frame buffer!!! (The area of the frame > buffer is 1024x512 !!! -remember?!) Also, where's your CLUT positioned? > Did you code a routine to diplay a non-textured object ?? (You'll find > plenty of sources in the demos area of the SCEE-yaroze webside, and on the > members homepages too.. ) Good idea. Start off with just an object with no texture, get it to display then try an object with textures. > 2) Load the .RSD file (object file) into either RSDTOOL or > RSDANIM(preferred) apply the texture(s). Fame at last :) > 3) Use RSDLINK to convert it to a .TMD file. RsdANIM save's TMD's you know.... > Carlos Pieterse Craig.