MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / PrepareDevice

Method PrepareDevice

olcPixelGameEngine.h:5323–5338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5321
5322 public:
5323 void PrepareDevice() override
5324 {
5325#if defined(OLC_PLATFORM_GLUT)
5326 //glutInit has to be called with main() arguments, make fake ones
5327 int argc = 0;
5328 char* argv[1] = { (char*)"" };
5329 glutInit(&argc, argv);
5330 glutInitWindowPosition(0, 0);
5331 glutInitWindowSize(512, 512);
5332 glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGBA);
5333 // Creates the window and the OpenGL context for it
5334 glutCreateWindow("OneLoneCoder.com - Pixel Game Engine");
5335 glEnable(GL_TEXTURE_2D); // Turn on texturing
5336 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
5337#endif
5338 }
5339
5340 olc::rcode CreateDevice(std::vector<void*> params, bool bFullScreen, bool bVSYNC) override
5341 {

Callers 1

CreateWindowPaneMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected