From bf3cc032b099a260a61aed7aecd705693820078c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 31 Jan 2014 14:52:38 +0000 Subject: [PATCH] TestEGr 1.5a1 : Primo commit. --- OpenGLRenderer.cpp | 322 +++++++++++++++++++++++++++++++++++++++++++++ OpenGLRenderer.h | 60 +++++++++ TestEGr.cpp | 75 +++++++++++ TestEGr.h | 32 +++++ TestEGr.rc | Bin 0 -> 13380 bytes TestEGr.sln | 26 ++++ TestEGr.vcxproj | 233 ++++++++++++++++++++++++++++++++ TestEGrDlg.cpp | 214 ++++++++++++++++++++++++++++++ TestEGrDlg.h | 45 +++++++ res/TestEGr.ico | Bin 0 -> 9158 bytes res/TestEGr.rc2 | Bin 0 -> 798 bytes resource.h | Bin 0 -> 1360 bytes stdafx.cpp | 8 ++ stdafx.h | 58 ++++++++ targetver.h | 8 ++ 15 files changed, 1081 insertions(+) create mode 100644 OpenGLRenderer.cpp create mode 100644 OpenGLRenderer.h create mode 100644 TestEGr.cpp create mode 100644 TestEGr.h create mode 100644 TestEGr.rc create mode 100644 TestEGr.sln create mode 100644 TestEGr.vcxproj create mode 100644 TestEGrDlg.cpp create mode 100644 TestEGrDlg.h create mode 100644 res/TestEGr.ico create mode 100644 res/TestEGr.rc2 create mode 100644 resource.h create mode 100644 stdafx.cpp create mode 100644 stdafx.h create mode 100644 targetver.h diff --git a/OpenGLRenderer.cpp b/OpenGLRenderer.cpp new file mode 100644 index 0000000..73d45dc --- /dev/null +++ b/OpenGLRenderer.cpp @@ -0,0 +1,322 @@ +// OpenGLRenderer.cpp : implementation file +// + +#include "stdafx.h" +#include "OpenGLRenderer.h" + + +// OpenGLRenderer + +//---------------------------------------------------------------------------- +OpenGLRenderer::OpenGLRenderer( void) +{ + m_hdc = nullptr ; + m_hrc = nullptr ; +} + +//---------------------------------------------------------------------------- +OpenGLRenderer::~OpenGLRenderer( void) +{ +} + +//---------------------------------------------------------------------------- +BEGIN_MESSAGE_MAP( OpenGLRenderer, CWnd) +// ON_WM_PAINT() +END_MESSAGE_MAP() + + +// OpenGLRenderer message handlers + +bool +OpenGLRenderer::CreateGLContext( CRect rect, CWnd *parent) +{ + CString className = AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW | CS_OWNDC, NULL, (HBRUSH)GetStockObject(WHITE_BRUSH), NULL) ; //default background colour + CreateEx( 0, className, _T("OpenGL with MFC/CDialog"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rect, parent, 0) ; + + m_rectWin = rect ; + if ( ! InitContext()) { + MessageBox( _T("ERROR Creating InitContext")) ; + return false ; + } + + // Setup the OpenGL Window's timer to render + //m_unpTimer = SetTimer( 1, 20, 0) ; + + return true ; +} + +//---------------------------------------------------------------------------- +bool +OpenGLRenderer::InitContext( void) +{ + PIXELFORMATDESCRIPTOR pfd ; + memset( &pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)) ; + pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR) ; + pfd.nVersion = 1 ; + pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW ; + pfd.iPixelType = PFD_TYPE_RGBA ; + pfd.cColorBits = 32 ; + pfd.cDepthBits = 32 ; + pfd.iLayerType = PFD_MAIN_PLANE ; + + m_hdc = GetDC()->m_hDC ; + + int nPixelFormat = ChoosePixelFormat( m_hdc, &pfd) ; + if ( nPixelFormat == 0) + return false ; + BOOL bResult = SetPixelFormat (m_hdc, nPixelFormat, &pfd) ; + if ( ! bResult) + return false ; + + HGLRC tempContext = wglCreateContext( m_hdc) ; + wglMakeCurrent( m_hdc, tempContext) ; + + GLenum WglewInitResult ; + WglewInitResult = wglewInit() ; + + if ( WglewInitResult != GLEW_OK) { + AfxMessageBox( _T("WGLEW is not initialized!")) ; + } + + int attribs[] = { + WGL_CONTEXT_MAJOR_VERSION_ARB, 3, + WGL_CONTEXT_MINOR_VERSION_ARB, 3, + WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, + //WGL_CONTEXT_FLAGS_ARB, 0, + 0 + }; + + if ( wglewIsSupported( "WGL_ARB_create_context") == 1) { + m_hrc = wglCreateContextAttribsARB( m_hdc, 0, attribs) ; + wglMakeCurrent( m_hdc, NULL) ; + wglDeleteContext( tempContext) ; + wglMakeCurrent( m_hdc, m_hrc) ; + } + else { + //It's not possible to make a GL 3.x context. Use the old style context (GL 2.1 and before) + m_hrc = tempContext; + } + + if ( ! m_hrc) + return false; + + GLenum GlewInitResult; + glewExperimental = GL_TRUE ; + GlewInitResult = glewInit() ; + + if ( GlewInitResult != GLEW_OK) { + AfxMessageBox( _T("GLEW is not initialized!")) ; + } + + CString str; + str.Format(_T("OpenGL version: %s\n"),(CString)glGetString(GL_VERSION)); + TRACE(str); + return true; +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::PrepareScene( void) +{ + wglMakeCurrent( m_hdc, m_hrc) ; + glClearColor(0.0, 0.0, 1.0, 0.0); //background to clear with. + + GLenum qq = glGetError() ; + //do other preparations here + glMatrixMode( GL_PROJECTION) ; + qq = glGetError() ; + glLoadIdentity() ; + qq = glGetError() ; + glOrtho( -10, 10, -10, 10, 1, 1000) ; + + qq = glGetError() ; + + glMatrixMode( GL_MODELVIEW) ; + qq = glGetError() ; + glLoadIdentity() ; + qq = glGetError() ; + gluLookAt( 0, 0, 10, + 0, 0, -100, + 0, 1, 0) ; + + qq = glGetError() ; + + wglMakeCurrent( m_hdc, NULL) ; +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::Reshape( int nW, int nH) +{ + if ( m_hdc == NULL) + return ; + + m_rectWin.SetRect( m_rectWin.left, m_rectWin.top, m_rectWin.left + nW, m_rectWin.top + nH) ; + MoveWindow( m_rectWin, FALSE) ; + + if ( wglMakeCurrent( m_hdc, m_hrc)) + glViewport( 0, 0, (GLsizei)nW, (GLsizei)nH) ; + wglMakeCurrent( m_hdc, NULL) ; + + DrawScene() ; +} + +//---------------------------------------------------------------------------- +//void +//OpenGLRenderer::OnPaint( void) +//{ +// DrawScene(); +//} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::DrawScene( void) +{ + + wglMakeCurrent( m_hdc, m_hrc) ; + + //-------------------------------- + + //-------------------------------- + glClear( GL_COLOR_BUFFER_BIT) ; + + for ( int i=0; i<2; i++) { + if ( m_vaoID[i] != 0) { + glBindVertexArray( m_vaoID[i]) ; + glDrawArrays( GL_LINE_STRIP, 0, m_GLSizeCount) ; + } + } + //-------------------------------- + glFlush() ; + SwapBuffers( m_hdc) ; + wglMakeCurrent( m_hdc, NULL) ; +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::SetData( int iType) +{ + const int SQUARE = 1 ; + //const int CUBE = 2 ; + const int TRIANGLE = 3 ; + m_iShapeType = iType ; + + switch ( iType) { + case SQUARE : + SetSquare() ; + break; + case TRIANGLE: + SetTriangle() ; + break; + default: + SetTriangle() ; + } +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::SetSquare( void) +{ + wglMakeCurrent( m_hdc, m_hrc) ; + + // First simple object + m_GLSizeCount = 5 ; + m_GLIntSize = 4 ; + GLfloat Square[] = { + -0.5f, -0.5f, 0.0f, 1.0f, + -0.5f, 0.5f, 0.0f, 1.0f, + 0.5f, 0.5f, 0.0f, 1.0f, + 0.5f, -0.5f, 0.0f, 1.0f, + -0.5f, -0.5f, 0.0f, 1.0f + } ; + + // inizializzo VAOs a non allocati + m_vaoID[0] = 0 ; + m_vaoID[1] = 0 ; + + // VAO allocation + glGenVertexArrays( 1, &m_vaoID[0]) ; + if ( m_vaoID[0] == 0) + return ; + + // First VAO setup + glBindVertexArray( m_vaoID[0]) ; + glGenBuffers( 1, &m_vboID[0]) ; + glBindBuffer( GL_ARRAY_BUFFER, m_vboID[0]) ; + glBufferData( GL_ARRAY_BUFFER, sizeof( Square), Square, GL_STATIC_DRAW) ; + glVertexAttribPointer( (GLuint)0, m_GLIntSize, GL_FLOAT, GL_FALSE, 0, 0) ; + glEnableVertexAttribArray( 0) ; + glBindVertexArray( 0) ; + + wglMakeCurrent( m_hdc, NULL) ; +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::SetTriangle( void) +{ + wglMakeCurrent( m_hdc, m_hrc) ; + + m_GLIntSize = 4; //number of floats per item. i.e. number of floats per point in space. + m_GLSizeCount = 4; //number of items. ie sizeof(TriangleA)/m_GLIntSize + + GLfloat TriangleA[] = { + -0.3f, 0.5f, -1.0f, 1.0f, + -0.8f, -0.5f, -1.0f, 1.0f, + 0.2f, -0.5f, -1.0f, 1.0f, + -0.3f, 0.5f, -1.0f, 1.0f + } ; + + GLfloat TriangleB[] = { + -0.2f, 0.5f, -1.0f, 1.0f, + 0.3f, -0.5f, -1.0f, 1.0f, + 0.8f, 0.5f, -1.0f, 1.0f, + -0.2f, 0.5f, -1.0f, 1.0f + } ; + + // inizializzo VAOs a non allocati + m_vaoID[0] = 0 ; + m_vaoID[1] = 0 ; + + // VAOs allocation + glGenVertexArrays( 2, &m_vaoID[0]) ; + + // First VAO setup + glBindVertexArray( m_vaoID[0]) ; + glGenBuffers( 1, &m_vboID[0]) ; //VBO allocation + glBindBuffer( GL_ARRAY_BUFFER, m_vboID[0]) ; + glBufferData( GL_ARRAY_BUFFER, sizeof(TriangleA), TriangleA, GL_STATIC_DRAW) ; + glVertexAttribPointer( (GLuint)0, m_GLIntSize, GL_FLOAT, GL_FALSE, 0, 0) ; + glEnableVertexAttribArray( 0) ; + glBindVertexArray( 0) ; + + // Second VAO setup + glBindVertexArray( m_vaoID[1]) ; + glGenBuffers( 1, &m_vboID[1]) ; //VBO allocation + glBindBuffer( GL_ARRAY_BUFFER, m_vboID[1]) ; + glBufferData( GL_ARRAY_BUFFER, sizeof(TriangleB), TriangleB, GL_STATIC_DRAW) ; + glVertexAttribPointer( (GLuint)0, m_GLIntSize, GL_FLOAT, GL_FALSE, 0, 0) ; + glEnableVertexAttribArray( 0) ; + glBindVertexArray( 0) ; + + wglMakeCurrent( m_hdc, NULL) ; +} + +//---------------------------------------------------------------------------- +void +OpenGLRenderer::DestroyScene( void) +{ + wglMakeCurrent( m_hdc, m_hrc) ; + + glBindBuffer( GL_ARRAY_BUFFER, 0) ; + glDeleteBuffers( 2, m_vboID) ; + + glBindVertexArray( 0) ; + glDeleteVertexArrays( 2, m_vaoID) ; + + wglMakeCurrent( nullptr, nullptr) ; + if ( m_hrc != nullptr) { + wglDeleteContext( m_hrc) ; + m_hrc = nullptr ; + } +} diff --git a/OpenGLRenderer.h b/OpenGLRenderer.h new file mode 100644 index 0000000..05edae6 --- /dev/null +++ b/OpenGLRenderer.h @@ -0,0 +1,60 @@ +#pragma once + +#pragma comment(lib, "opengl32.lib") +#pragma comment(lib, "glu32.lib") +#if defined( _WIN64) + #pragma comment(lib, "/EgtDev/Extern/GLEW/lib/x64/glew32mx.lib") //make sure project settings have: Linker -> Additional Library Directories -> include path for library. +#else + #pragma comment(lib, "/EgtDev/Extern/GLEW/lib/x32/glew32mx.lib") //make sure project settings have: Linker -> Additional Library Directories -> include path for library. +#endif +#define GLEW_MX + +#include "/EgtDev/Extern/GLEW/Include/glew.h" +#include "/EgtDev/Extern/GLEW/Include/wglew.h" + + +// OpenGLRenderer + +class OpenGLRenderer : public CWnd +{ + public: + OpenGLRenderer( void); + virtual ~OpenGLRenderer( void); + bool CreateGLContext( CRect rect, CWnd *parent); + void PrepareScene( void) ; // Scene preparation + void Reshape( int nW, int nH) ; + void DrawScene( void) ; // Draw scene + void DestroyScene( void) ; // Cleanup + + CRect& GetWinRect( void) + { return m_rectWin ; } + + void SetData( int iType) ; // Creates VAO and VBOs and fill them with data + + GLEWContext* glewGetContext( void) + { return &m_glewc ; } + WGLEWContext* wglewGetContext( void) + { return &m_wglewc ; } + + protected : + void SetTriangle( void) ; + void SetSquare( void) ; + bool InitContext( void) ; // Creates OpenGL Rendering Context + afx_msg void OnPaint( void) ; + + + HDC m_hdc ; + HGLRC m_hrc ; // OpenGL Rendering Context + GLEWContext m_glewc ; // GLEW Context + WGLEWContext m_wglewc ; // WGLEW Context + + CRect m_rectWin ; + + GLuint m_vaoID[2] ; // 2 vertex array objects + GLuint m_vboID[2] ; // 2 VBOs + int m_GLIntSize ; + int m_GLSizeCount ; + int m_iShapeType ; //1,3 for triangle & square. + + DECLARE_MESSAGE_MAP() +} ; diff --git a/TestEGr.cpp b/TestEGr.cpp new file mode 100644 index 0000000..dedc0f7 --- /dev/null +++ b/TestEGr.cpp @@ -0,0 +1,75 @@ +//---------------------------------------------------------------------------- +// EgalTech 2013-2014 +//---------------------------------------------------------------------------- +// File : TestEGr.cpp Data : 29.01.14 Versione : 1.5a1 +// Contenuto : Implementazione della classe applicazione test grafica. +// +// +// +// Modifiche : 29.01.14 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +//--------------------------- Include ---------------------------------------- +#include "stdafx.h" +#include "TestEGr.h" +#include "TestEGrDlg.h" + +//---------------------------------------------------------------------------- +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +//---------------------------------------------------------------------------- +// The one and only CTestEGrApp object +CTestEGrApp theApp ; + +//---------------------------------------------------------------------------- +BEGIN_MESSAGE_MAP( CTestEGrApp, CWinApp) + ON_COMMAND( ID_HELP, &CWinApp::OnHelp) +END_MESSAGE_MAP() + +//---------------------------------------------------------------------------- +CTestEGrApp::CTestEGrApp( void) +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +//---------------------------------------------------------------------------- +BOOL +CTestEGrApp::InitInstance( void) +{ + // InitCommonControlsEx() is required on Windows XP if an application + // manifest specifies use of ComCtl32.dll version 6 or later to enable + // visual styles. Otherwise, any window creation will fail. + INITCOMMONCONTROLSEX InitCtrls ; + InitCtrls.dwSize = sizeof( InitCtrls) ; + // Set this to include all the common control classes you want to use + // in your application. + InitCtrls.dwICC = ICC_WIN95_CLASSES ; + InitCommonControlsEx( &InitCtrls) ; + + CWinApp::InitInstance() ; + + AfxEnableControlContainer() ; + + CTestEGrDlg dlg ; + m_pMainWnd = &dlg ; + INT_PTR nResponse = dlg.DoModal() ; + if ( nResponse == IDOK) { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + else if ( nResponse == IDCANCEL) { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE ; +} + diff --git a/TestEGr.h b/TestEGr.h new file mode 100644 index 0000000..28c41e7 --- /dev/null +++ b/TestEGr.h @@ -0,0 +1,32 @@ + +// TestEGr.h : main header file for the PROJECT_NAME application +// + +#pragma once + +#ifndef __AFXWIN_H__ + #error "include 'stdafx.h' before including this file for PCH" +#endif + +#include "resource.h" // main symbols + + +// CTestEGrApp: +// See TestEGr.cpp for the implementation of this class +// + +class CTestEGrApp : public CWinApp +{ +public: + CTestEGrApp(); + +// Overrides +public: + virtual BOOL InitInstance(); + +// Implementation + + DECLARE_MESSAGE_MAP() +}; + +extern CTestEGrApp theApp; \ No newline at end of file diff --git a/TestEGr.rc b/TestEGr.rc new file mode 100644 index 0000000000000000000000000000000000000000..ab0cd193d1717566508aad9110f206b9c5a96161 GIT binary patch literal 13380 zcmeHOYfoE85Z%v}`X6pDRh6jJ;Fvu6(b(Wx0b^l9NQH!m!Nd|6WScys{`R)#%rM^j zwoPbiB!uj}-n%?Ye>MxskheV|@B6bHCy* za2M{}4e=SFeuDB0bt9DQcZ;VUo&)?MwSl`qo09v{{eV%{q+CJm5N|Kh`b^q}ss1JR z(S_2QJy)b%U;2@D)wNy6b=`rhyQbT7CvM+up|+0amfLafQPaWquG>V-4xVj%^00h= z#+{XcYd|hZ8TTQjYj=hDPaqx2p^I4`;k$`h*Dz1YV+-{!@JVVUt%E*Bp#1x2ot7wR z9zuF=L9w2zw+U=uBo;AopFnE_U7O}sWDaN0T0gh{Dc*g#<2BkdZ6Qj11iPYz`L-sr z<gIYi0l=lGSh(6LBM zB}SVG+)pvTKLfR@+lIxfzjt7r2k`tFEc666x`RK`{R@9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>h0p z-uV1?TX}BD8*16NTE`1=8~0msX#5$vD4%))O>E%qFz?g$?#^(?KT%_X9h7`Y&Bm2H zkIv7w=2;^4P zK~-&rx0HFmiESs68BsgDMNQic(DDX<%#wO|=3Pj=2gTofvIwj9Bd^ege!z1xeb1Xy zq^?#G-1TPOb%{1(oc-wAE0iUnMvk-Zg_#w`%USo#;;nh&nD3Q3D?L5Qx3y^IxL7v1 z+?Hql!E(`T#Oz=>XK376`K>qBnOUe6`TrqM>*f4ae#LQqo*ZHxI{Ep+JiTY<2J=vv zCl4SUrS<>cm9|)J{3PSH;X_``CZZ_*K77Q^<0&gPN0CkW=>TcD!Yz)>I);zJ{LRmD T`mXmV&#}$iYk~1=-W=dxp6-LZ literal 0 HcmV?d00001 diff --git a/TestEGr.sln b/TestEGr.sln new file mode 100644 index 0000000..f8e31b9 --- /dev/null +++ b/TestEGr.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestEGr", "TestEGr.vcxproj", "{F93E2F86-DD41-466C-9069-6EF7B660EA3D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Debug|Win32.ActiveCfg = Debug|Win32 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Debug|Win32.Build.0 = Debug|Win32 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Debug|x64.ActiveCfg = Debug|x64 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Debug|x64.Build.0 = Debug|x64 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Release|Win32.ActiveCfg = Release|Win32 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Release|Win32.Build.0 = Release|Win32 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Release|x64.ActiveCfg = Release|x64 + {F93E2F86-DD41-466C-9069-6EF7B660EA3D}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestEGr.vcxproj b/TestEGr.vcxproj new file mode 100644 index 0000000..72a35b8 --- /dev/null +++ b/TestEGr.vcxproj @@ -0,0 +1,233 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F93E2F86-DD41-466C-9069-6EF7B660EA3D} + TestEGr + MFCProj + + + + Application + true + Unicode + Dynamic + + + Application + true + Unicode + Dynamic + + + Application + false + true + Unicode + Dynamic + + + Application + false + true + Unicode + Dynamic + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)D$(PlatformArchitecture) + + + true + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)D$(PlatformArchitecture) + + + false + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)R$(PlatformArchitecture) + + + false + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)R$(PlatformArchitecture) + + + + Use + Level3 + Disabled + WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) + + + Windows + true + + + false + true + _DEBUG;%(PreprocessorDefinitions) + + + 0x0409 + _DEBUG;_DEB32;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + copy $(TargetPath) \EgtProg\TestEGr\ + + + + + Use + Level3 + Disabled + WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) + + + Windows + true + + + false + _DEBUG;%(PreprocessorDefinitions) + + + 0x0409 + _DEBUG;_DEB32;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + copy $(TargetPath) \EgtProg\TestEGr\ + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + false + true + NDEBUG;%(PreprocessorDefinitions) + + + 0x0409 + NDEBUG;NDEB32;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + copy $(TargetPath) \EgtProg\TestEGr\ + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + false + NDEBUG;%(PreprocessorDefinitions) + + + 0x0409 + NDEBUG;NDEB32;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + copy $(TargetPath) \EgtProg\TestEGr\ + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestEGrDlg.cpp b/TestEGrDlg.cpp new file mode 100644 index 0000000..a78adf6 --- /dev/null +++ b/TestEGrDlg.cpp @@ -0,0 +1,214 @@ +//---------------------------------------------------------------------------- +// EgalTech 2013-2014 +//---------------------------------------------------------------------------- +// File : TestEGrDlg.cpp Data : 29.01.14 Versione : 1.5a1 +// Contenuto : Implementazione della classe gestione dialogo principale. +// +// +// +// Modifiche : 29.01.14 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +//--------------------------- Include ---------------------------------------- +#include "stdafx.h" +#include "TestEGr.h" +#include "TestEGrDlg.h" +#include "afxdialogex.h" + +//---------------------------------------------------------------------------- +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +//---------------------------------------------------------------------------- +// CAboutDlg dialog used for App About +class CAboutDlg : public CDialogEx +{ + public : + CAboutDlg( void) ; + + DECLARE_MESSAGE_MAP() +} ; + +//---------------------------------------------------------------------------- +CAboutDlg::CAboutDlg( void) : CDialogEx( IDD_ABOUTBOX) +{ +} + +BEGIN_MESSAGE_MAP( CAboutDlg, CDialogEx) +END_MESSAGE_MAP() + + +//---------------------------------------------------------------------------- +// CTestEGrDlg dialog +//---------------------------------------------------------------------------- +CTestEGrDlg::CTestEGrDlg( CWnd* pParent) + : CDialogEx( IDD_TESTEGR_DIALOG, pParent) +{ + m_hIcon = AfxGetApp()->LoadIcon( IDR_MAINFRAME) ; + m_bOpenGLWindowsExists = false ; +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::DoDataExchange( CDataExchange* pDX) +{ + CDialogEx::DoDataExchange( pDX) ; +} + +//---------------------------------------------------------------------------- +BEGIN_MESSAGE_MAP( CTestEGrDlg, CDialogEx) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_SIZE() +END_MESSAGE_MAP() + +//---------------------------------------------------------------------------- +BOOL +CTestEGrDlg::OnInitDialog( void) +{ + CDialogEx::OnInitDialog() ; + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX) ; + ASSERT(IDM_ABOUTBOX < 0xF000) ; + + CMenu* pSysMenu = GetSystemMenu( FALSE) ; + if ( pSysMenu != NULL) { + BOOL bNameValid ; + CString strAboutMenu ; + bNameValid = strAboutMenu.LoadString( IDS_ABOUTBOX) ; + ASSERT( bNameValid) ; + if ( ! strAboutMenu.IsEmpty()) { + pSysMenu->AppendMenu( MF_SEPARATOR) ; + pSysMenu->AppendMenu( MF_STRING, IDM_ABOUTBOX, strAboutMenu) ; + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon( m_hIcon, TRUE) ; // Set big icon + SetIcon( m_hIcon, FALSE) ; // Set small icon + + StartOpenGL() ; + + return TRUE ; // return TRUE unless you set the focus to a control +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::OnOK( void) +{ + m_OGL_Window.DestroyScene() ; + + CDialogEx::OnOK() ; +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::OnSysCommand( UINT nID, LPARAM lParam) +{ + if ( (nID & 0xFFF0) == IDM_ABOUTBOX) { + CAboutDlg dlgAbout ; + dlgAbout.DoModal() ; + } + else { + CDialogEx::OnSysCommand( nID, lParam) ; + } +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::OnPaint( void) +{ + if ( IsIconic()) { + CPaintDC dc( this) ; // device context for painting + + SendMessage( WM_ICONERASEBKGND, reinterpret_cast( dc.GetSafeHdc()), 0) ; + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics( SM_CXICON) ; + int cyIcon = GetSystemMetrics( SM_CYICON) ; + CRect rect ; + GetClientRect( &rect) ; + int x = ( rect.Width() - cxIcon + 1) / 2 ; + int y = ( rect.Height() - cyIcon + 1) / 2 ; + + // Draw the icon + dc.DrawIcon( x, y, m_hIcon) ; + } + else { + CDialogEx::OnPaint() ; + m_OGL_Window.DrawScene() ; + m_OGL_Window.ValidateRgn( NULL) ; + } +} + +//---------------------------------------------------------------------------- +HCURSOR +CTestEGrDlg::OnQueryDragIcon( void) +{ + return static_cast( m_hIcon) ; +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::OnSize( UINT nType, int cx, int cy) +{ + const int SIDEBAR_W = 200 ; + + + CDialogEx::OnSize( nType, cx, cy) ; + + // se ridotta a icona non si fa alcunché + if ( cx <= 0 || cy <= 0 || nType == SIZE_MINIMIZED) + return ; + + // se cambiata dimensione + if ( nType == SIZE_RESTORED || nType == SIZE_MAXIMIZED) { + // spostamento comandi + CWnd* pOK = GetDlgItem( IDOK) ; + if ( pOK != nullptr) { + CRect rect ; + pOK->GetWindowRect( rect) ; + pOK->MoveWindow( cx - rect.Width() / 2 - SIDEBAR_W / 2, cy - rect.Height(), + rect.Width(), rect.Height(), TRUE) ; + } + // adattamento finestra + if ( m_bOpenGLWindowsExists) { + CRect rect = m_OGL_Window.GetWinRect() ; + m_OGL_Window.Reshape( cx - rect.left - SIDEBAR_W, cy - rect.top) ; + } + } +} + +//---------------------------------------------------------------------------- +void +CTestEGrDlg::StartOpenGL( void) +{ + CRect rectWin ; + + + GetDlgItem( IDC_SCENE)->GetWindowRect( rectWin) ; + ScreenToClient( rectWin) ; + + if ( m_bOpenGLWindowsExists) { + m_OGL_Window.DestroyScene() ; + m_bOpenGLWindowsExists = false ; + } + + // Create OpenGL Control window + if ( ! m_bOpenGLWindowsExists) { + m_OGL_Window.CreateGLContext( rectWin, this) ; + m_OGL_Window.PrepareScene() ; + m_OGL_Window.SetData( 1) ; + m_bOpenGLWindowsExists = true ; + } +} + diff --git a/TestEGrDlg.h b/TestEGrDlg.h new file mode 100644 index 0000000..94abe77 --- /dev/null +++ b/TestEGrDlg.h @@ -0,0 +1,45 @@ +//---------------------------------------------------------------------------- +// EgalTech 2013-2014 +//---------------------------------------------------------------------------- +// File : TestEGrDlg.h Data : 29.01.14 Versione : 1.5a1 +// Contenuto : Dichiarazione della classe gestione dialogo principale. +// +// +// +// Modifiche : 29.01.14 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "OpenGLRenderer.h" + + +//---------------------------------------------------------------------------- +class CTestEGrDlg : public CDialogEx +{ + public : + CTestEGrDlg( CWnd* pParent = NULL) ; + + protected : + virtual void DoDataExchange( CDataExchange* pDX) ; + + protected : + virtual BOOL OnInitDialog( void) ; + virtual void OnOK( void) ; + afx_msg void OnSysCommand( UINT nID, LPARAM lParam) ; + afx_msg void OnPaint( void) ; + afx_msg HCURSOR OnQueryDragIcon( void) ; + afx_msg void OnSize( UINT nType, int cx, int cy) ; + + private : + void StartOpenGL( void) ; + + private : + HICON m_hIcon ; + bool m_bOpenGLWindowsExists ; + OpenGLRenderer m_OGL_Window ; + + DECLARE_MESSAGE_MAP() +} ; diff --git a/res/TestEGr.ico b/res/TestEGr.ico new file mode 100644 index 0000000000000000000000000000000000000000..fd6bc2a7a40aaad9f510ed0d4e272114fb1b3c4e GI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Wx*=|B7`F5|N3*zXqYT<+4z{T^Mt z@8c-@y#4$c*lh@)e{=x-b}piS>M{n$1=Ii3O2(wG#pCoACSOisO6E44!=K_Z_c1uSu4Dci-)|+R2tUD?|& zus5-njlsmk>hsuG?5!fL?5z~~b1N&WIA(o5ZFMB}pDRY+#L6R5{>qi3e7OdZ)pSQw z%4tm}n~Gd%O=qbL!E{D>xnD)abw)XZf~qfi26?&is)p)7kqMF_LjQ>#qAf`hb0(gUyL(n|_u6|9sQ_>^s@s2Llb zIy5AKrTnfP*h+I;lr2x1zplQ}X~XfC$6Q`@`B#dL+5>Ign27X)E`3H!wGVach=I7f zRYp`rbCt^2vrbGw`MGY0vYGLkWyZYn&&6?nf8Uf*y}1`t`aSO<{pr#1k0~ZJnO}Y> d34Cd`+iJp|*WWBX)7yW_TCeUIx03vit}ox8Xl(!h literal 0 HcmV?d00001 diff --git a/resource.h b/resource.h new file mode 100644 index 0000000000000000000000000000000000000000..f9b64cfbf78dbc1bac22559e7b70af334997cc5b GIT binary patch literal 1360 zcmbu9OHaZ;6ot>)#Q)I5rHOzp)Fo0RL@0z;VAV*W216j>p%~*|SHC+2(F7_9nM~W6 z-uZgx+%x_9%qXLGTA-Rj`6{YT58P9rg364V`kkDmINpxRt#IzXAArw`DbwQ7Q zqAjm8$1;+A%_D1{EJNjW$G+OEw|kd2hqbI$%F=T5eSH52zH#@Hn@5s!sX4b?MeSNr z!_~ZuP8IYirK)2&U+yIvsS2lzckbcl85L7`+e+l%-s~k8AUAQ8x$;orhMnk~D82P> zfJau&wdTMWZ!U45x%kETcj??_&Ya>j&w1*V`&4~B^DZKG?($8}L*kGT@d?jk_jPh^ z;XEHj>|~iP9iAT8gTLOZt(c^&X%L$yy2jdydQOKPx|)|O@OL@WJa69)omyRT2&smh zVLJy6r(;MaR`K=@J*^hE2a^j>tFG?$$4KLPx`KR7+wIO>c^f@o2MxF1bb386|wK>Vy8?yb+2K;B@wMKu(-}82^VE_OC literal 0 HcmV?d00001 diff --git a/stdafx.cpp b/stdafx.cpp new file mode 100644 index 0000000..9b04f2d --- /dev/null +++ b/stdafx.cpp @@ -0,0 +1,8 @@ + +// stdafx.cpp : source file that includes just the standard includes +// TestEGr.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + diff --git a/stdafx.h b/stdafx.h new file mode 100644 index 0000000..4cb6425 --- /dev/null +++ b/stdafx.h @@ -0,0 +1,58 @@ + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#pragma once + +#ifndef _SECURE_ATL +#define _SECURE_ATL 1 +#endif + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#endif + +#include "targetver.h" + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit + +// turns off MFC's hiding of some common and often safely ignored warning messages +#define _AFX_ALL_WARNINGS + +#include // MFC core and standard components +#include // MFC extensions + + +#include // MFC Automation classes + + + +#ifndef _AFX_NO_OLE_SUPPORT +#include // MFC support for Internet Explorer 4 Common Controls +#endif +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC support for ribbons and control bars + + + + + + + + + +#ifdef _UNICODE +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif +#endif + + diff --git a/targetver.h b/targetver.h new file mode 100644 index 0000000..90e767b --- /dev/null +++ b/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include