|
|
|
@ -67,6 +67,9 @@ to simplify porting. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class GlutApplication { |
|
|
|
class GlutApplication { |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
/** @brief Application arguments */ |
|
|
|
|
|
|
|
typedef std::pair<int&, char**> Arguments; |
|
|
|
|
|
|
|
|
|
|
|
class Configuration; |
|
|
|
class Configuration; |
|
|
|
class InputEvent; |
|
|
|
class InputEvent; |
|
|
|
class KeyEvent; |
|
|
|
class KeyEvent; |
|
|
|
@ -75,25 +78,23 @@ class GlutApplication { |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Default constructor |
|
|
|
* @brief Default constructor |
|
|
|
* @param argc Count of arguments of `main()` function |
|
|
|
* @param arguments Application arguments |
|
|
|
* @param argv Arguments of `main()` function |
|
|
|
|
|
|
|
* |
|
|
|
* |
|
|
|
* Creates application with default configuration. See Configuration |
|
|
|
* Creates application with default configuration. See Configuration |
|
|
|
* for more information. |
|
|
|
* for more information. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
explicit GlutApplication(int& argc, char** argv); |
|
|
|
explicit GlutApplication(const Arguments& arguments); |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Constructor |
|
|
|
* @brief Constructor |
|
|
|
* @param argc Count of arguments of `main()` function |
|
|
|
* @param arguments Application arguments |
|
|
|
* @param argv Arguments of `main()` function |
|
|
|
|
|
|
|
* @param configuration Configuration |
|
|
|
* @param configuration Configuration |
|
|
|
* |
|
|
|
* |
|
|
|
* The @p configuration is deleted afterwards. If `nullptr` is passed |
|
|
|
* The @p configuration is deleted afterwards. If `nullptr` is passed |
|
|
|
* as @p configuration, the context is not created and must be created |
|
|
|
* as @p configuration, the context is not created and must be created |
|
|
|
* with createContext(). |
|
|
|
* with createContext(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
explicit GlutApplication(int& argc, char** argv, Configuration* configuration); |
|
|
|
explicit GlutApplication(const Arguments& arguments, Configuration* configuration); |
|
|
|
|
|
|
|
|
|
|
|
virtual ~GlutApplication(); |
|
|
|
virtual ~GlutApplication(); |
|
|
|
|
|
|
|
|
|
|
|
@ -465,7 +466,7 @@ code to achieve better portability, see @ref portability-applications for more |
|
|
|
information. |
|
|
|
information. |
|
|
|
@code |
|
|
|
@code |
|
|
|
int main(int argc, char** argv) { |
|
|
|
int main(int argc, char** argv) { |
|
|
|
className app(argc, argv); |
|
|
|
className app({argc, argv}); |
|
|
|
return app.exec(); |
|
|
|
return app.exec(); |
|
|
|
} |
|
|
|
} |
|
|
|
@endcode |
|
|
|
@endcode |
|
|
|
@ -474,7 +475,7 @@ When no other application header is included this macro is also aliased to |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define MAGNUM_GLUTAPPLICATION_MAIN(className) \ |
|
|
|
#define MAGNUM_GLUTAPPLICATION_MAIN(className) \ |
|
|
|
int main(int argc, char** argv) { \
|
|
|
|
int main(int argc, char** argv) { \
|
|
|
|
className app(argc, argv); \
|
|
|
|
className app({argc, argv}); \
|
|
|
|
return app.exec(); \
|
|
|
|
return app.exec(); \
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|