Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const int XDIM=256;
  2. const int YDIM=256;
  3. const int ZDIM=256;
  4. const int size = XDIM*YDIM*ZDIM;
  5.  
  6. bool LoadVolumeFromFile(const char* fileName)
  7. {
  8. FILE *pFile = fopen(fileName,"r");
  9. if(pFile == NULL)
  10. {
  11. return false;
  12. }
  13.  
  14. GLubyte* pVolume = new GLubyte[size];
  15. fscanf(pFile,"%s",pVolume);
  16. fclose(pFile);
  17. for(int i=0; i<size; i++)
  18. {
  19. printf("%dn",pVolume[i]);
  20. getch();
  21. }
  22. return true;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement