mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 15:30:41 +00:00
Merge pull request #930 from BeamNG/separate_opengl_from_os
Separate OpenGL code from Linux or Mac.
This commit is contained in:
commit
b632d06c97
2 changed files with 8 additions and 8 deletions
|
|
@ -31,10 +31,11 @@
|
|||
#include "gfx/gfxDevice.h"
|
||||
#include "core/util/safeDelete.h"
|
||||
|
||||
#if !defined( TORQUE_OS_MAC ) && !defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OS_WIN32 ) || defined( TORQUE_OS_XBOX )
|
||||
# include "lighting/advanced/hlsl/gBufferConditionerHLSL.h"
|
||||
# include "lighting/advanced/hlsl/advancedLightingFeaturesHLSL.h"
|
||||
#else
|
||||
#endif
|
||||
#if defined( TORQUE_OPENGL )
|
||||
# include "lighting/advanced/glsl/gBufferConditionerGLSL.h"
|
||||
# include "lighting/advanced/glsl/advancedLightingFeaturesGLSL.h"
|
||||
#endif
|
||||
|
|
@ -54,7 +55,7 @@ void AdvancedLightingFeatures::registerFeatures( const GFXFormat &prepassTargetF
|
|||
|
||||
if(GFX->getAdapterType() == OpenGL)
|
||||
{
|
||||
#if defined( TORQUE_OS_MAC ) || defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OPENGL )
|
||||
cond = new GBufferConditionerGLSL( prepassTargetFormat, GBufferConditionerGLSL::ViewSpace );
|
||||
FEATUREMGR->registerFeature(MFT_PrePassConditioner, cond);
|
||||
FEATUREMGR->registerFeature(MFT_RTLighting, new DeferredRTLightingFeatGLSL());
|
||||
|
|
@ -66,7 +67,7 @@ void AdvancedLightingFeatures::registerFeatures( const GFXFormat &prepassTargetF
|
|||
}
|
||||
else
|
||||
{
|
||||
#if !defined( TORQUE_OS_MAC ) && !defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OS_WIN32 )
|
||||
cond = new GBufferConditionerHLSL( prepassTargetFormat, GBufferConditionerHLSL::ViewSpace );
|
||||
FEATUREMGR->registerFeature(MFT_PrePassConditioner, cond);
|
||||
FEATUREMGR->registerFeature(MFT_RTLighting, new DeferredRTLightingFeatHLSL());
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
#include "lighting/basic/blTerrainSystem.h"
|
||||
#include "lighting/common/projectedShadow.h"
|
||||
|
||||
|
||||
#if defined( TORQUE_OS_MAC ) || defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OPENGL )
|
||||
#include "shaderGen/GLSL/shaderFeatureGLSL.h"
|
||||
#include "shaderGen/GLSL/bumpGLSL.h"
|
||||
#include "shaderGen/GLSL/pixSpecularGLSL.h"
|
||||
|
|
@ -163,7 +162,7 @@ void BasicLightManager::activate( SceneManager *sceneManager )
|
|||
|
||||
if( GFX->getAdapterType() == OpenGL )
|
||||
{
|
||||
#if defined( TORQUE_OS_MAC ) || defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OPENGL )
|
||||
FEATUREMGR->registerFeature( MFT_LightMap, new LightmapFeatGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_ToneMap, new TonemapFeatGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_NormalMap, new BumpFeatGLSL );
|
||||
|
|
@ -173,7 +172,7 @@ void BasicLightManager::activate( SceneManager *sceneManager )
|
|||
}
|
||||
else
|
||||
{
|
||||
#if !defined( TORQUE_OS_MAC ) && !defined( TORQUE_OS_LINUX )
|
||||
#if defined( TORQUE_OS_WIN32 )
|
||||
FEATUREMGR->registerFeature( MFT_LightMap, new LightmapFeatHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_ToneMap, new TonemapFeatHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_NormalMap, new BumpFeatHLSL );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue