Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. // create output
  2. colorOutput_t *output = NULL;
  3.  
  4. yi->paramsClearAll();
  5. yi->paramsSetString("type", "tga");
  6. yi->paramsSetInt("width", 640);
  7. yi->paramsSetInt("height", 480);
  8. imageHandler_t *ih = yi->createImageHandler("outFile");
  9.  
  10. if(ih)
  11. {
  12. output = new imageOutput_t(ih,"test.tga", 0, 0);
  13. if(!output) return 1;
  14. }
  15. else return 1;
  16.  
  17.  
  18. yi->render(*output);
  19. yi->clearAll();
  20. delete yi;
  21.  
  22.  
  23. //save tga file:
  24. output->flush();
  25.  
  26. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement