Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int XDIM=256;
- const int YDIM=256;
- const int ZDIM=256;
- const int size = XDIM*YDIM*ZDIM;
- bool LoadVolumeFromFile(const char* fileName)
- {
- FILE *pFile = fopen(fileName,"r");
- if(pFile == NULL)
- {
- return false;
- }
- GLubyte* pVolume = new GLubyte[size];
- fscanf(pFile,"%s",pVolume);
- fclose(pFile);
- for(int i=0; i<size; i++)
- {
- printf("%dn",pVolume[i]);
- getch();
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement