EgtGraphics 1.8i1 :
- aggiornamenti per GLEW 2.1.0.
This commit is contained in:
Binary file not shown.
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
//--------------------------- Macro e Costanti -------------------------------
|
||||
// Per funzioni glew dipendenti dal context
|
||||
#define glewGetContext() (( m_pScene != nullptr) ? m_pScene->glewGetContext() : nullptr)
|
||||
//#define glewGetContext() (( m_pScene != nullptr) ? m_pScene->glewGetContext() : nullptr)
|
||||
// Dimensioni flag per edge di triangoli
|
||||
const size_t SIZEFLAG = sizeof( unsigned char) ;
|
||||
// Dimensioni record del buffer ( vertice + normale + flag)
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define GLEW_MX
|
||||
#define NOMINMAX
|
||||
#include "/EgtDev/Extern/GLEW/Include/glew.h"
|
||||
#include "/EgtDev/Extern/GLEW/Include/wglew.h"
|
||||
|
||||
@@ -188,8 +188,6 @@ class Scene : public IEGrScene
|
||||
// Basic
|
||||
Scene( void) ;
|
||||
bool MakeCurrent( void) const ;
|
||||
GLEWContext* glewGetContext( void)
|
||||
{ return &m_glewc ; }
|
||||
int GetOpenGLver( void)
|
||||
{ return m_nOglVer ; }
|
||||
// Geometry
|
||||
@@ -201,8 +199,6 @@ class Scene : public IEGrScene
|
||||
private :
|
||||
// Basic
|
||||
int ChooseGenPixelFormat( int nPfd, bool b2Buff, int nColorBits, int nDepthBits) ;
|
||||
WGLEWContext* wglewGetContext( void)
|
||||
{ return &m_wglewc ; }
|
||||
bool CalcExtView( void) ;
|
||||
bool CalcDimViewFromExtView( void) ;
|
||||
bool AdjustDimView( double dHalfWidth, double dHalfHeight) ;
|
||||
@@ -253,12 +249,10 @@ class Scene : public IEGrScene
|
||||
|
||||
private :
|
||||
// Basic
|
||||
HDC m_hDC ; // Device Context
|
||||
HGLRC m_hRC ; // OpenGL Rendering Context
|
||||
WGLEWContext m_wglewc ; // WGLEW Context
|
||||
GLEWContext m_glewc ; // GLEW Context
|
||||
int m_nOglVer ; // OpenGL Version
|
||||
bool m_bNewWay ; // flag che indica nuova modalità (OpenGL 3.0 in poi)
|
||||
HDC m_hDC ; // Device Context
|
||||
HGLRC m_hRC ; // OpenGL Rendering Context
|
||||
int m_nOglVer ; // OpenGL Version
|
||||
bool m_bNewWay ; // flag che indica nuova modalità (OpenGL 3.0 in poi)
|
||||
// Camera
|
||||
Point3d m_ptCenter ; // centro verso cui è rivolta la camera
|
||||
Vector3d m_vtDirCamera ; // versore direzione dal centro alla camera
|
||||
|
||||
+5
-6
@@ -50,8 +50,6 @@ Scene::Scene( void)
|
||||
// Context data
|
||||
m_hDC = nullptr ;
|
||||
m_hRC = nullptr ;
|
||||
memset( &m_wglewc, 0, sizeof( WGLEWContext)) ;
|
||||
memset( &m_glewc, 0, sizeof( GLEWContext)) ;
|
||||
m_nOglVer = 0 ;
|
||||
m_bNewWay = false ;
|
||||
// Camera e viewport
|
||||
@@ -279,12 +277,13 @@ Scene::MakeCurrent( void) const
|
||||
if ( m_hRC == nullptr)
|
||||
return false ;
|
||||
|
||||
// se RC della scena non è quello corrente, lo imposto
|
||||
// se RC della scena è quello corrente, ok
|
||||
HGLRC hRC = wglGetCurrentContext() ;
|
||||
if ( m_hRC != hRC)
|
||||
return ( wglMakeCurrent( m_hDC, m_hRC) != 0) ;
|
||||
if ( m_hRC == hRC)
|
||||
return true ;
|
||||
|
||||
return true ;
|
||||
// impost RC della scena
|
||||
return ( wglMakeCurrent( m_hDC, m_hRC) != 0) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
#pragma comment(lib, "opengl32.lib")
|
||||
#pragma comment(lib, "glu32.lib")
|
||||
#if defined( _WIN64)
|
||||
#pragma comment(lib, EGTEXTDIR "GLEW/lib/x64/glew32mx.lib")
|
||||
#pragma comment(lib, EGTEXTDIR "GLEW/lib/x64/glew32.lib")
|
||||
#pragma comment(lib, EGTEXTDIR "FreeImage/lib/x64/FreeImage.lib")
|
||||
#elif defined( _WIN32)
|
||||
#pragma comment(lib, EGTEXTDIR "GLEW/lib/x32/glew32mx.lib")
|
||||
#pragma comment(lib, EGTEXTDIR "GLEW/lib/x32/glew32.lib")
|
||||
#pragma comment(lib, EGTEXTDIR "FreeImage/lib/x32/FreeImage.lib")
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user