Accueil > > > Infos Image Pour OpenGL\Window.h
INFOS IMAGE POUR OPENGL
Infos Image Pour OpenGL\Window.h
Informations sur ce code source
Ce programme donne toutes les informations nécessaires concernant une image afin de pouvoir la charger avec OpenGL au travers de fonctions comme glDrawPixels(), glTexImage2D(), ect...
Les informations données sont : L’extension, la largeur, la
Fichier : Infos Image Pour OpenGL\Window.h
Nombre de lignes : 68 lignes
Afficher ce fichier en plein écran
-
- //--------------------------
- // Window.h
- //---------------------------
-
- #ifndef WINDOW_H__
- #define WINDOW_H__
-
- #include "Image_Infos.h"
-
- #include <windows.h>
- #include <string>
-
- namespace img{
-
- class cWindow : cImageInfos
- {
- HINSTANCE mHinstance;
- HWND mHwnd;
- HDC mHdc;
- MSG mMsg;
- HMENU mHmenu1;
- HMENU mHmenu11;
- HMENU mHmenu22;
- std::string mTitle;
- std::string mClassName;
- DWORD mWndStyle;
-
- int mPosx;
- int mPosy;
- int mWidth;
- int mHeight;
-
- std::string mFileName;
- static cWindow* mStaticWindow;
-
- public:
-
- cWindow();
- virtual ~cWindow();
-
- bool CreateNewWindow(HINSTANCE hinstance, std::string name, int posx, int posy, int width, int height);
- void MainLoop();
-
- LRESULT CALLBACK WndProc(HWND Hwnd, UINT umsg, WPARAM wParam, LPARAM lParam);
- static LRESULT CALLBACK StaticWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam);
- static bool APIENTRY DialogBoxAboutProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
- int GetPosx()const {return mPosx;};
- int GetPosy()const {return mPosy;};
- int GetWidth()const {return mWidth;};
- int GetHeight()const {return mHeight;};
- std::string GetTitle()const {return mTitle;};
-
- private:
-
- bool CreateWndClass();
- bool CreateNewMenu();
- std::string DialogBoxOpenFileName();
- void DisplayInformations();
-
- };
-
- } //namespace img
-
- #endif // WINDOW_H
-
|