MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / Init

Method Init

include/Window.hpp:66–75  ·  view source on GitHub ↗

* Initializes the window. * * @param width The width of the window. * @param height The height of the window. * @param title The desired title of the window. * @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details. * * @see ::SetConfigFlags() * @see ConfigFlags * * @throws raylib::RaylibException

Source from the content-addressed store, hash-verified

64 * @throws raylib::RaylibException Thrown if the window failed to initiate.
65 */
66 static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) {
67 if (flags != 0) {
68 ::SetConfigFlags(flags);
69 }
70 ::SetTraceLogLevel(logLevel);
71 ::InitWindow(width, height, title.c_str());
72 if (!::IsWindowReady()) {
73 throw RaylibException("Failed to create Window");
74 }
75 }
76
77 /**
78 * Check if KEY_ESCAPE pressed or Close icon pressed

Callers

nothing calls this directly

Calls 3

InitWindowFunction · 0.85
RaylibExceptionClass · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected