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

Function PrepareDevice

olcPixelGameEngine.h:5917–5932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5915
5916 public:
5917 void PrepareDevice() override
5918 {
5919#if defined(OLC_PLATFORM_GLUT)
5920 //glutInit has to be called with main() arguments, make fake ones
5921 int argc = 0;
5922 char* argv[1] = { (char*)"" };
5923 glutInit(&argc, argv);
5924 glutInitWindowPosition(0, 0);
5925 glutInitWindowSize(512, 512);
5926 glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGBA);
5927 // Creates the window and the OpenGL context for it
5928 glutCreateWindow("OneLoneCoder.com - Pixel Game Engine");
5929 glEnable(GL_TEXTURE_2D); // Turn on texturing
5930 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
5931#endif
5932 }
5933
5934 olc::rcode CreateDevice(std::vector<void*> params, bool bFullScreen, bool bVSYNC) override
5935 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected