text: Download source - 5.1 MB
  Download demo - 5.5 MB
  This article is the continuation of the article last month published with the almost the same name just with one key word replacement. But it is a replacement of fundamental importance. The replacement MFC to Win32 comprehends the great changes in codes. And a lot of people prefer Win32 codes. paticularly bulding the project provided it is highly recommended to have a look to the Demo presentation enclosed in order to get an idea of the output expected.
  The executable WIN_GL.exe in the WIN_GLdemo directory has been built with MSVS-2015 pro using the remains the same as per original lessons corresponding from NeHe site.
  The controls of the Help Dialog as follows:
  The Help Dialog is unmodal, therefore, it is possible both to use the keyboard commands listed or to select the command from the List Control and press the Ok button(or double click mouse left button).
  With the regards to the respected authors of the original code, the About Dialog (Menu Help->About...) contains the original NeHe's ReadMe texts:
  The Joystick using is available in the lessons 09, 10, 32, 40, X4, X5. You may adjust the Joystick yourself to any other lesson (or in some projects of your own) with the Joystick implementation inctructions enclosed.
  The Joystick functionality may be tested with the Menu View->Joystick Test command (or keyboard Ctrl+J or button 8 on the Joystick itself) with the Joystick Test Dialog(where applicable). Win32 Projects," just with Picture Control removed.
  The help on the Joystick for the lessons affected to be obtained with Menu Help->Joystick Help Dialog command ( or keyboard Ctrl+Y or Joystick help button in the Help dialog) with the Joystick Help dialog (where applicable). WIN_GLproj\WIN_GLproj\WIN_GLproj.sln file pls take in consist or three similiar projects differ just by the degree of building complexity:
  WIN_GL0
  WIN_GL1
  WIN_GL
  Even if you are first time working with MSVS just appoint the WIN_GL0 project as SatrtUp project ( right mouse button click -> menu Set as StartUp Project ) and select menu Debug->Start without debugging and the program WIN_GL0.exe should start building and working.
  WIN_GL0
  The project provided has been developed with MSVS-2015 pro using the Joistick implementation. The problem is that external libruary hid.lib used.
  Before you start to build the project WIN_GL1 with the instruments of MSVS-2010 you must ensure three things in the project concerned:
  #include <hidsdi.h>
  The lesson 43 requires the external libruary of freetype.lib which requires the installation of the Program Files\GnuWin32 directory(17.8 Mb) from the link.
  Before you start to build the project WIN_GL with the Lesson 43 you must ensure four things in the project concerned:
  The lesson 47 requires the external libruaries of cg.dll and cgGL.dll which require the installation of the Program Files\NVIDIA Corporation directory(596 Mb) from the link.
  Before you start to build the project WIN_GL with adaptating the first glance it seemed that there are too many files enclosed, but further consideration shows that everything is not too much complicated. The project consists of the common pocedures and special procedures for every lesson implementation.
  All three projects WIN_GL0, WIN_GL1, WIN_GL have similiar combied by the author from the original lessons 07, 11, 30, 32, 34 in Demo purposes.
  X5_BoxmanDrawInit.cpp developed by the author in Demo purposes.
  Just a few changes have been done in XX_*DrawInit.cpp codes from previous article due to the plarfom change from MFC to Win32.
  Special source codes for the separate lessons in the WIN_GLproj\NeHeProgs\XX_Spec paths (XX in range 01-48)have been borrowed developed by the author.
  Just a few changes have been done in Special source codes files from previous article due to the plarfom change from MFC to Win32;
  Source codes in WIN_GLproj\GlobUse path have been developed by the author based on the standard Win32 Application Wizard technologies:
  Glaux.lib
  Just a few changes has been made in GlobDrawGL.cpp from previous article due to the plarfom created by the author.
  Nothing changed in Data Files from the previuos changed in ReadMe texts from the previuos article.
  Resouce files WIN_GLproj path have been created borrowed from the previous article with a few changes regarding the name of the application:
  The control flow-chart of the standard OpenGL application with the steps numerated as per items of the this resently to be called while initialization procedure InitGLWindow. The CreateGLWindow procedure almost completely has been borrowed from the original NeHe lessons and as much as possible I've tried not to change the authoring codes.
  CreateGLWindow
  InitGLWindow.
  Initialization procedure to be called in the procedure CreateGLWindow:
  if (!InitGL()) // Initialize Our Newly Created GL Window
  {
  KillGLWindow(); // Reset The Display
  MessageBox(NULL, _T("Initialization Failed."), _T("ERROR"),MB_OK|MB_ICONEXCLAMATION);
  exit(0);
  }
  InitGL
  InitGL_XX(GLvoid)
  The only big difference is that I've took the liberty to exclude the Glaux.lib library from all the lessons used for the texture initialization. Nevertheless, I hope the authors of the original code will not complain. Surely they could not expect MS VS developers that with the WM_SIZE message in the WndGLProc :
  ResizeGLScene
  case WM_SIZE: // Resize The OpenGL Window
  {
  ReSizeGLScene(LOWORD(lParam), HIWORD(lParam)); // LoWord=Width, HiWord=Height
  return 0; // Jump Back
  }
  int m_boxWidth = 800; //GL winow width
  int m_boxHeight = 600; //GL window height
  In some lessons (30,31,34,36,44,45,46,X4) the Frustum values set differ from default ones in the InitGL_XX procedure.
  InitGL_XX
  In the lessons 21 and 24 the glOrtho presentation keyboard commands have been borrowed from the NeHe site. I've tried not to change these commands as far as possible. Just F1 command I've changed for Help perfomance:
  case ID_APP_EXIT:
  Deinitialize();
  KillGLWindow();
  DestroyWindow(hWnd);
  break; much as possible.
  DeinitializeN
  Deinitialize_XX
  The procedure KillGLwindow is common to all the lessons and located in available in the lessons 09, 10, 32, 40, X4, X5 in projects WIN_GL and WIN_GL1. In the project WIN_GL0 the Joystick functions are not available. Next two steps require to make WIN_GL0 working with the Joystick as in WIN_GL1:
  void InitJoystickDlg(void){}
  And that's all ( point 2.1 of this article conditions understood). Now the project to
  GlobUse\GlobDrawGL.cpp Libruaries the Lessons 43 and 47 are available in the project.
  The set of lessons provided represents the exciting opportunities for the development of some effective presentations of the applications. These possibilites codes there codes are more euphemistical for the progs.