-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Megha S <[email protected]>
- Loading branch information
Showing
11 changed files
with
31 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
char fileName[100]; | ||
char fileName[] = ""; | ||
// [begin hasEnvmap] | ||
RgbaInputFile file (fileName); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
// [begin writeRgba1] | ||
void | ||
writeRgba1 (const char fileName[], const Rgba* pixels, int width, int height) | ||
{ | ||
RgbaOutputFile file (fileName, width, height, WRITE_RGBA); // 1 | ||
file.setFrameBuffer (pixels, 1, width); // 2 | ||
file.writePixels (height); // 3 | ||
} | ||
// [end writeRgba1] | ||
|
||
void | ||
tryCatchExample (const char fileName[], const Rgba* pixels, int width, int height) { | ||
// [begin tryCatchExample] | ||
try | ||
{ | ||
writeRgba1 (fileName, pixels, width, height); | ||
} | ||
catch (const std::exception &exc) | ||
{ | ||
std::cerr << exc.what() << std::endl; | ||
} | ||
// [end tryCatchExample] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters