Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split DirectX stuff into a subdirectory of plPipeline #345

Merged
merged 6 commits into from
Jul 25, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 34 additions & 23 deletions Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ set(plPipeline_SOURCES
plCullTree.cpp
plDebugText.cpp
plDTProgressMgr.cpp
plDXEnumerate.cpp
plDXPipeline.cpp
plDXPixelShader.cpp
plDXShader.cpp
plDXTextFont.cpp
plDXVertexShader.cpp
plDynamicEnvMap.cpp
plFogEnvironment.cpp
plGBufferGroup.cpp
Expand All @@ -38,11 +32,22 @@ set(plPipeline_SOURCES
plVertCoder.cpp
)

set(plDXPipeline_SOURCES
DX/plDXDeviceRefs.cpp
DX/plDXEnumerate.cpp
DX/plDXPipeline.cpp
DX/plDXPixelShader.cpp
DX/plDXShader.cpp
DX/plDXTextFont.cpp
DX/plDXVertexShader.cpp
)

set(plPipeline_HEADERS
hsFogControl.h
hsG3DDeviceSelector.h
hsGColorizer.h
hsGDDrawDllLoad.h
hsGDeviceRef.h
hsWinRef.h
plBinkPlayer.h
plCaptureRender.h
Expand All @@ -53,13 +58,6 @@ set(plPipeline_HEADERS
plDebugText.h
plDrawPrim.h
plDTProgressMgr.h
plDXEnumerate.h
plDXPipeline.h
plDXPixelShader.h
plDXSettings.h
plDXShader.h
plDXTextFont.h
plDXVertexShader.h
plDynamicEnvMap.h
plFogEnvironment.h
plGBufferGroup.h
Expand All @@ -76,18 +74,31 @@ set(plPipeline_HEADERS
plVertCoder.h
)

set(plPipeline_DEVICEREFS
hsGDeviceRef.h
plDXBufferRefs.h
plDXDeviceRef.h
plDXDeviceRefs.cpp
plDXLightRef.h
plDXRenderTargetRef.h
plDXTextureRef.h
set(plDXPipeline_HEADERS
DX/plDXBufferRefs.h
DX/plDXDeviceRef.h
DX/plDXEnumerate.h
DX/plDXLightRef.h
DX/plDXPipeline.h
DX/plDXPixelShader.h
DX/plDXRenderTargetRef.h
DX/plDXSettings.h
DX/plDXShader.h
DX/plDXTextFont.h
DX/plDXTextureRef.h
DX/plDXVertexShader.h
)

add_library(plPipeline STATIC ${plPipeline_SOURCES} ${plPipeline_HEADERS} ${plPipeline_DEVICEREFS})
if(WIN32)
add_library(plPipeline STATIC ${plPipeline_SOURCES} ${plDXPipeline_SOURCES} ${plPipeline_HEADERS} ${plDXPipeline_HEADERS})
else()
add_library(plPipeline STATIC ${plPipeline_SOURCES} ${plPipeline_HEADERS})
endif()

source_group("Source Files" FILES ${plPipeline_SOURCES})
source_group("Header Files" FILES ${plPipeline_HEADERS})
source_group("DeviceRefs" FILES ${plPipeline_DEVICEREFS})

if(WIN32)
source_group("DX\\Source Files" FILES ${plDXPipeline_SOURCES})
source_group("DX\\Header Files" FILES ${plDXPipeline_HEADERS})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plDXDeviceRef_h

#include "HeadSpin.h"
#include "hsGDeviceRef.h"
#include "plPipeline/hsGDeviceRef.h"


//// Definition ///////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <d3d9.h>
#include <ddraw.h>

#include "hsWinRef.h"
#include "plPipeline/hsWinRef.h"

#include "plDXPipeline.h"
#include "plDXDeviceRef.h"
#include "plDXBufferRefs.h"
#include "plDXLightRef.h"
#include "plDXTextureRef.h"
#include "plDXRenderTargetRef.h"
#include "plGBufferGroup.h"
#include "plPipeline/plGBufferGroup.h"
#include "plDrawable/plGeometrySpan.h"
#include "plDrawable/plDrawableSpans.h"
#include "plGLight/plLightInfo.h"
#include "plRenderTarget.h"
#include "plCubicRenderTarget.h"
#include "plDynamicEnvMap.h"
#include "plPipeline/plRenderTarget.h"
#include "plPipeline/plCubicRenderTarget.h"
#include "plPipeline/plDynamicEnvMap.h"

#include "plProfile.h"
#include "plStatusLog/plStatusLog.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDXEnumerate.h"
#include <ddraw.h>

#include "hsGDDrawDllLoad.h"
#include "hsG3DDeviceSelector.h"
#include "plPipeline/hsGDDrawDllLoad.h"
#include "plPipeline/hsG3DDeviceSelector.h"


//// Local Typedefs ///////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <dxerr.h>
#endif

#include "hsWinRef.h"
#include "plPipeline/hsWinRef.h"

#include "HeadSpin.h"
#include "plDXPipeline.h"
#include "plPipelineCreate.h"
#include "plDebugText.h"
#include "plPipeline/plPipelineCreate.h"
#include "plPipeline/plDebugText.h"
#include "plDXEnumerate.h"
#include "hsG3DDeviceSelector.h"
#include "hsGDDrawDllLoad.h"
#include "plPipeline/hsG3DDeviceSelector.h"
#include "plPipeline/hsGDDrawDllLoad.h"
#include "hsResMgr.h"
#include "plStatusLogDrawer.h"
#include "plPipeline/plStatusLogDrawer.h"
#include "plQuality.h"

#include "plPipeDebugFlags.h"
#include "plPipeline/plPipeDebugFlags.h"

#include "hsTemplates.h"
//#include "hsGEnviron.h"
Expand All @@ -110,17 +110,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plParticleSystem/plParticleEmitter.h"
#include "plParticleSystem/plParticle.h"
#include "plAvatar/plAvatarClothing.h"
#include "plDebugText.h"
#include "plFogEnvironment.h"
#include "plPipeline/plDebugText.h"
#include "plPipeline/plFogEnvironment.h"
#include "plDXTextFont.h"
#include "plGBufferGroup.h"
#include "plPipeline/plGBufferGroup.h"
#include "hsTimer.h"
#include "plgDispatch.h"
#include "plScene/plRenderRequest.h"
#include "plScene/plVisMgr.h"
#include "plRenderTarget.h"
#include "plCubicRenderTarget.h"
#include "plDynamicEnvMap.h"
#include "plPipeline/plRenderTarget.h"
#include "plPipeline/plCubicRenderTarget.h"
#include "plPipeline/plDynamicEnvMap.h"
#include "pfCamera/plVirtualCamNeu.h"

#include "plDXBufferRefs.h"
Expand Down Expand Up @@ -158,7 +158,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnKeyedObject/plKey.h"
#endif

#include "plCullTree.h"
#include "plPipeline/plCullTree.h"

#include "plTweak.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com

#include "plSurface/plLayerInterface.h"
#include "hsMatrix44.h"
#include "plFogEnvironment.h"
#include "hsG3DDeviceSelector.h"
#include "plPipeline/plFogEnvironment.h"
#include "plPipeline/hsG3DDeviceSelector.h"
#include "hsGeometry3.h"
#include "hsTemplates.h"
#include "hsColorRGBA.h"
#include "hsGDeviceRef.h"
#include "plPipeline/hsGDeviceRef.h"
#include "hsPoint2.h"

class plAccessSpan;
class plAuxSpan;
class plVertexSpan;

#include "plPlates.h" // Used to define plDXPlateManager
#include "plPipeline/plPlates.h" // Used to define plDXPlateManager


//// Defines and Konstants and Other Nifty Stuff //////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plDXSettings_h

#include "hsMatrix44.h"
#include "plFogEnvironment.h"
#include "plPipeline/plFogEnvironment.h"
#include "hsGeometry3.h"
#include "hsTemplates.h"
#include "hsColorRGBA.h"
#include "hsBitVector.h"
#include "plStencil.h"
#include "plPipeline/plStencil.h"
#include "hsPoint2.h"
#include "plCullTree.h"
#include "hsWinRef.h"
#include "plPipeline/plCullTree.h"
#include "plPipeline/hsWinRef.h"
#include "plViewTransform.h"

//// General Settings /////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <ddraw.h>
#include <d3dx9mesh.h>

#include "hsWinRef.h"
#include "plPipeline/hsWinRef.h"
#include "plDXTextFont.h"
#include "plDXPipeline.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plDXTextFont_h
#define _plDXTextFont_h

#include "plTextFont.h"
#include "plPipeline/plTextFont.h"
//#include "hsGDirect3DTnLDevice.h"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com

#include "plSurface/plShader.h"

#include "plGBufferGroup.h"
#include "plPipeline/plGBufferGroup.h"
#include "plDXPipeline.h"

plDXVertexShader::plDXVertexShader(plShader* owner)
Expand Down
6 changes: 5 additions & 1 deletion Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com

*==LICENSE==*/

#ifdef HS_BUILD_FOR_WIN32

#include "hsWindows.h"

#include <ddraw.h>
Expand Down Expand Up @@ -71,4 +73,6 @@ hsGDDrawDllLoad::~hsGDDrawDllLoad()
HMODULE hsGDDrawDllLoad::GetD3DDll()
{
return staticDllLoad.fD3DDll;
}
}

#endif //HS_BUILD_FOR_WIN32
Original file line number Diff line number Diff line change
Expand Up @@ -169,51 +169,51 @@ bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir

bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg )
{
plSceneObject *scene;
plCubicRenderTarget *cubic;
int i;


plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
if( eval )
if (eval)
{
const double secs = eval->DSeconds();
const float del = eval->DelSeconds();
IEval( secs, del, 0 );
IEval(secs, del, 0);
return true;
}
plRefMsg *refMsg = plRefMsg::ConvertNoRef( msg );
if( refMsg )

plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
if (refMsg)
{
if( scene = plSceneObject::ConvertNoRef( refMsg->GetRef() ) )
plSceneObject* scene = plSceneObject::ConvertNoRef(refMsg->GetRef());
if (scene)
{
if( refMsg->GetContext() & ( plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace ) )
AddTarget( scene );
if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
AddTarget(scene);
else
RemoveTarget( scene );
RemoveTarget(scene);
}
if( cubic = plCubicRenderTarget::ConvertNoRef( refMsg->GetRef() ) )

plCubicRenderTarget* cubic = plCubicRenderTarget::ConvertNoRef(refMsg->GetRef());
if (cubic)
{
if( refMsg->GetContext() & ( plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace ) )
if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
{
fCubic = cubic;
for( i = 0; i < 6; i++ )
ICreateRenderRequest( i );
for (int i = 0; i < 6; i++)
ICreateRenderRequest(i);
}
else
{
fCubic = nil;
for( i = 0; i < 6; i++ )
fCubic = nullptr;
for (int i = 0; i < 6; i++)
{
delete fRequests[ i ];
fRequests[ i ] = nil;
delete fRequests[i];
fRequests[i] = nullptr;
}
}
}

return true;
}

return plModifier::MsgReceive( msg );
return plModifier::MsgReceive(msg);
}

//// AddTarget ////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -256,4 +256,4 @@ void plCubicRenderTargetModifier::Write( hsStream *s, hsResMgr *mgr )

mgr->WriteKey( s, fTarget ); // Write the SceneNode
mgr->WriteKey( s, fCubic ); // Write the cubicRT
}
}
2 changes: 1 addition & 1 deletion Sources/Plasma/PubUtilLib/plPipeline/plPipelineCreatable.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com

#include <d3d9.h>

#include "plDXPipeline.h"
#include "DX/plDXPipeline.h"

REGISTER_NONCREATABLE( plDXPipeline );

Expand Down
4 changes: 4 additions & 0 deletions Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ plTextFont::~plTextFont()

uint16_t *plTextFont::IInitFontTexture( void )
{
#ifdef HS_BUILD_FOR_WIN32
int nHeight, x, y, c;
char myChar[ 2 ] = "x";
uint16_t *tBits;
Expand Down Expand Up @@ -190,6 +191,9 @@ uint16_t *plTextFont::IInitFontTexture( void )
DeleteObject( hFont );

return data;
#else
return nullptr;
#endif
}

//// Create ///////////////////////////////////////////////////////////////////
Expand Down
Loading