X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50f5d508a868be985e7ac91e84b62c13c2ea1ad9..fcc9ca7f72b92d6b0a4eabe72f205d54480df72e:/samples/opengl/cube/cube.h diff --git a/samples/opengl/cube/cube.h b/samples/opengl/cube/cube.h index 1e1ff9500f..36769b884f 100644 --- a/samples/opengl/cube/cube.h +++ b/samples/opengl/cube/cube.h @@ -24,21 +24,18 @@ public: void DrawRotatedCube(float xangle, float yangle); private: - // one-time OpenGL initialization, safe to call many times - void Init(); - - - // the list of commands to draw the cube - GLuint m_gllist; + // textures for the cube faces + GLuint m_textures[6]; }; // Define a new application type -class MyApp: public wxApp +class MyApp : public wxApp { public: MyApp() { m_glContext = NULL; } - // get the context we use creating it on demand (and set it as current) + // Returns the shared context used by all frames and sets it as current for + // the given canvas. TestGLContext& GetContext(wxGLCanvas *canvas); // virtual wxApp methods @@ -51,7 +48,7 @@ private: }; // Define a new frame type -class MyFrame: public wxFrame +class MyFrame : public wxFrame { public: MyFrame(); @@ -59,8 +56,6 @@ public: private: void OnClose(wxCommandEvent& event); void OnNewWindow(wxCommandEvent& event); - void OnDefRotateLeftKey(wxCommandEvent& event); - void OnDefRotateRightKey(wxCommandEvent& event); DECLARE_EVENT_TABLE() }; @@ -72,7 +67,6 @@ public: private: void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); void OnKeyDown(wxKeyEvent& event); // angles of rotation around x- and y- axis @@ -83,4 +77,3 @@ private: }; #endif // _WX_CUBE_H_ -