#include <command.h>
Inheritance diagram for CommandCapture:


Public Member Functions | |
| CommandCapture (const std::string &, const std::string &) | |
| void | process (ExecutionEnvironment &) |
Private Attributes | |
| std::string | filename |
| std::string | type |
|
||||||||||||
|
Definition at line 685 of file command.cpp.
|
|
|
Implements InstantaneousCommand. Definition at line 690 of file command.cpp. References CaptureGLBufferToJPEG(), CaptureGLBufferToPNG(), compareIgnoringCase(), filename, and type. 00691 {
00692 bool success = false;
00693 #ifndef MACOSX
00694
00695 // Get the dimensions of the current viewport
00696 int viewport[4];
00697 glGetIntegerv(GL_VIEWPORT, viewport);
00698
00699 if (compareIgnoringCase(type, "jpeg") == 0)
00700 {
00701 success = CaptureGLBufferToJPEG(filename,
00702 viewport[0], viewport[1],
00703 viewport[2], viewport[3]);
00704 }
00705 if (compareIgnoringCase(type, "png") == 0)
00706 {
00707 success = CaptureGLBufferToPNG(filename,
00708 viewport[0], viewport[1],
00709 viewport[2], viewport[3]);
00710 }
00711 #endif
00712 }
|
|
|
Definition at line 513 of file command.h. Referenced by process(). |
|
|
Definition at line 512 of file command.h. Referenced by process(). |
1.4.1