how can your for loop work when the counter isn't even declared as a type?
// UINT texture[100];
//float theta = 0.0f;
You have these variables commented out?
texture[counter] = LoadTextureRAW( "[counter].raw", TRUE );
I have never seen this syntax "[coutner].raw? you should probably have:
texture[counter] = LoadTextureRAW( "texture[counter].raw", TRUE );
Signatures are lame!! =)
[edited by - Mars_999 on December 5, 2002 3:09:34 PM]
Description of my problem
quote:Original post by MARS_999
how can your for loop work when the counter isn''t even declared as a type?
// UINT texture[100];
//float theta = 0.0f;
You have these variables commented out?
texture[counter] = LoadTextureRAW( "[counter].raw", TRUE );
I have never seen this syntax "[coutner].raw? you should probably have:
texture[counter] = LoadTextureRAW( "texture[counter].raw", TRUE );
Signatures are lame!! =)
<SPAN CLASS=editedby>[edited by - Mars_999 on December 5, 2002 3:09:34 PM]</SPAN>
Oh... i declared // UINT texture[100]; as global variable.
and
texture[counter] = LoadTextureRAW( "counter.raw", TRUE );
since my files name are 1.raw, 2.raw .... 100.raw
quote: texture[counter] = LoadTextureRAW( "counter.raw", TRUE );
since my files name are 1.raw, 2.raw .... 100.raw
If this is the exact code you used, it couldn''t work, because you''re trying to load a texture called "counter.raw" each time. You need to convert the variable counter to a string and then concatenate ".raw" at the end.
quote:Original post by Demosthenestexture[counter] = LoadTextureRAW( "counter.raw", TRUE );
since my files name are 1.raw, 2.raw …. 100.raw
If this is the exact code you used, it couldn''t work, because you''re trying to load a texture called "counter.raw" each time. You need to convert the variable counter to a string and then concatenate ".raw" at the end.
…
#include <stdio.h>
…
char string[32];
…
// load our texture
for (counter=0; counter <6; counter ++)
{
sprintf(string,"%d.raw",counter);
texture[counter] = LoadTextureRAW( string, TRUE );
}
anyway… this is not the issue now. i have solved this irritating problem. thanks..
now i need to change my dataset which comes in .raw format to .tga format and use those files for my existing program.
It must be a better idea to get a existing converter program which i need help on getting than altering my tga.cpp and tga.h codes to load .raw format files.
quote:Original post by Demosthenestexture[counter] = LoadTextureRAW( "counter.raw", TRUE );
since my files name are 1.raw, 2.raw …. 100.raw
If this is the exact code you used, it couldn''t work, because you''re trying to load a texture called "counter.raw" each time. You need to convert the variable counter to a string and then concatenate ".raw" at the end.
…
#include <stdio.h>
…
char string[32];
…
// load our texture
for (counter=0; counter <6; counter ++)
{
sprintf(string,"%d.raw",counter);
texture[counter] = LoadTextureRAW( string, TRUE );
}
anyway… this is not the issue now. i have solved this irritating problem. thanks..
now i need to change my dataset which comes in .raw format to .tga format and use those files for my existing program.
It must be a better idea to get a existing converter program which i need help on getting than altering my tga.cpp and tga.h codes to load .raw format files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement