Browse Source

Move all the DirectX-specific stuff into a folder.

This actually allows us to compile plPipeline on *nix (although linking
will fail).
Darryl Pogue 11 years ago
parent
commit
04d88377ad
  1. 56
      Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
  2. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXBufferRefs.h
  3. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXDeviceRef.h
  4. 10
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXDeviceRefs.cpp
  5. 4
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXEnumerate.cpp
  6. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXEnumerate.h
  7. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXLightRef.h
  8. 28
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.cpp
  9. 8
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h
  10. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPixelShader.cpp
  11. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPixelShader.h
  12. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXRenderTargetRef.h
  13. 10
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXSettings.h
  14. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXShader.cpp
  15. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXShader.h
  16. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextFont.cpp
  17. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextFont.h
  18. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextureRef.h
  19. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXVertexShader.cpp
  20. 0
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXVertexShader.h
  21. 4
      Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp
  22. 2
      Sources/Plasma/PubUtilLib/plPipeline/plPipelineCreatable.h
  23. 4
      Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp
  24. 4
      Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp

56
Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt

@ -20,12 +20,6 @@ set(plPipeline_SOURCES
plCullTree.cpp plCullTree.cpp
plDebugText.cpp plDebugText.cpp
plDTProgressMgr.cpp plDTProgressMgr.cpp
plDXEnumerate.cpp
plDXPipeline.cpp
plDXPixelShader.cpp
plDXShader.cpp
plDXTextFont.cpp
plDXVertexShader.cpp
plDynamicEnvMap.cpp plDynamicEnvMap.cpp
plFogEnvironment.cpp plFogEnvironment.cpp
plGBufferGroup.cpp plGBufferGroup.cpp
@ -38,11 +32,22 @@ set(plPipeline_SOURCES
plVertCoder.cpp 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 set(plPipeline_HEADERS
hsFogControl.h hsFogControl.h
hsG3DDeviceSelector.h hsG3DDeviceSelector.h
hsGColorizer.h hsGColorizer.h
hsGDDrawDllLoad.h hsGDDrawDllLoad.h
hsGDeviceRef.h
hsWinRef.h hsWinRef.h
plBinkPlayer.h plBinkPlayer.h
plCaptureRender.h plCaptureRender.h
@ -53,13 +58,6 @@ set(plPipeline_HEADERS
plDebugText.h plDebugText.h
plDrawPrim.h plDrawPrim.h
plDTProgressMgr.h plDTProgressMgr.h
plDXEnumerate.h
plDXPipeline.h
plDXPixelShader.h
plDXSettings.h
plDXShader.h
plDXTextFont.h
plDXVertexShader.h
plDynamicEnvMap.h plDynamicEnvMap.h
plFogEnvironment.h plFogEnvironment.h
plGBufferGroup.h plGBufferGroup.h
@ -76,18 +74,26 @@ set(plPipeline_HEADERS
plVertCoder.h plVertCoder.h
) )
set(plPipeline_DEVICEREFS set(plDXPipeline_HEADERS
hsGDeviceRef.h DX/plDXBufferRefs.h
plDXBufferRefs.h DX/plDXDeviceRef.h
plDXDeviceRef.h DX/plDXEnumerate.h
plDXDeviceRefs.cpp DX/plDXLightRef.h
plDXLightRef.h DX/plDXPipeline.h
plDXRenderTargetRef.h DX/plDXPixelShader.h
plDXTextureRef.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("Source Files" FILES ${plPipeline_SOURCES} ${plDXPipeline_SOURCES})
source_group("Header Files" FILES ${plPipeline_HEADERS}) source_group("Header Files" FILES ${plPipeline_HEADERS} ${plDXPipeline_HEADERS})
source_group("DeviceRefs" FILES ${plPipeline_DEVICEREFS})

0
Sources/Plasma/PubUtilLib/plPipeline/plDXBufferRefs.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXBufferRefs.h

2
Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRef.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXDeviceRef.h

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plDXDeviceRef_h #define _plDXDeviceRef_h
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsGDeviceRef.h" #include "plPipeline/hsGDeviceRef.h"
//// Definition /////////////////////////////////////////////////////////////// //// Definition ///////////////////////////////////////////////////////////////

10
Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXDeviceRefs.cpp

@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <d3d9.h> #include <d3d9.h>
#include <ddraw.h> #include <ddraw.h>
#include "hsWinRef.h" #include "plPipeline/hsWinRef.h"
#include "plDXPipeline.h" #include "plDXPipeline.h"
#include "plDXDeviceRef.h" #include "plDXDeviceRef.h"
@ -64,13 +64,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDXLightRef.h" #include "plDXLightRef.h"
#include "plDXTextureRef.h" #include "plDXTextureRef.h"
#include "plDXRenderTargetRef.h" #include "plDXRenderTargetRef.h"
#include "plGBufferGroup.h" #include "plPipeline/plGBufferGroup.h"
#include "plDrawable/plGeometrySpan.h" #include "plDrawable/plGeometrySpan.h"
#include "plDrawable/plDrawableSpans.h" #include "plDrawable/plDrawableSpans.h"
#include "plGLight/plLightInfo.h" #include "plGLight/plLightInfo.h"
#include "plRenderTarget.h" #include "plPipeline/plRenderTarget.h"
#include "plCubicRenderTarget.h" #include "plPipeline/plCubicRenderTarget.h"
#include "plDynamicEnvMap.h" #include "plPipeline/plDynamicEnvMap.h"
#include "plProfile.h" #include "plProfile.h"
#include "plStatusLog/plStatusLog.h" #include "plStatusLog/plStatusLog.h"

4
Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXEnumerate.cpp

@ -42,8 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDXEnumerate.h" #include "plDXEnumerate.h"
#include <ddraw.h> #include <ddraw.h>
#include "hsGDDrawDllLoad.h" #include "plPipeline/hsGDDrawDllLoad.h"
#include "hsG3DDeviceSelector.h" #include "plPipeline/hsG3DDeviceSelector.h"
//// Local Typedefs /////////////////////////////////////////////////////////// //// Local Typedefs ///////////////////////////////////////////////////////////

0
Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXEnumerate.h

0
Sources/Plasma/PubUtilLib/plPipeline/plDXLightRef.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXLightRef.h

28
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.cpp

@ -70,20 +70,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <dxerr.h> #include <dxerr.h>
#endif #endif
#include "hsWinRef.h" #include "plPipeline/hsWinRef.h"
#include "HeadSpin.h" #include "HeadSpin.h"
#include "plDXPipeline.h" #include "plDXPipeline.h"
#include "plPipelineCreate.h" #include "plPipeline/plPipelineCreate.h"
#include "plDebugText.h" #include "plPipeline/plDebugText.h"
#include "plDXEnumerate.h" #include "plDXEnumerate.h"
#include "hsG3DDeviceSelector.h" #include "plPipeline/hsG3DDeviceSelector.h"
#include "hsGDDrawDllLoad.h" #include "plPipeline/hsGDDrawDllLoad.h"
#include "hsResMgr.h" #include "hsResMgr.h"
#include "plStatusLogDrawer.h" #include "plPipeline/plStatusLogDrawer.h"
#include "plQuality.h" #include "plQuality.h"
#include "plPipeDebugFlags.h" #include "plPipeline/plPipeDebugFlags.h"
#include "hsTemplates.h" #include "hsTemplates.h"
//#include "hsGEnviron.h" //#include "hsGEnviron.h"
@ -110,17 +110,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plParticleSystem/plParticleEmitter.h" #include "plParticleSystem/plParticleEmitter.h"
#include "plParticleSystem/plParticle.h" #include "plParticleSystem/plParticle.h"
#include "plAvatar/plAvatarClothing.h" #include "plAvatar/plAvatarClothing.h"
#include "plDebugText.h" #include "plPipeline/plDebugText.h"
#include "plFogEnvironment.h" #include "plPipeline/plFogEnvironment.h"
#include "plDXTextFont.h" #include "plDXTextFont.h"
#include "plGBufferGroup.h" #include "plPipeline/plGBufferGroup.h"
#include "hsTimer.h" #include "hsTimer.h"
#include "plgDispatch.h" #include "plgDispatch.h"
#include "plScene/plRenderRequest.h" #include "plScene/plRenderRequest.h"
#include "plScene/plVisMgr.h" #include "plScene/plVisMgr.h"
#include "plRenderTarget.h" #include "plPipeline/plRenderTarget.h"
#include "plCubicRenderTarget.h" #include "plPipeline/plCubicRenderTarget.h"
#include "plDynamicEnvMap.h" #include "plPipeline/plDynamicEnvMap.h"
#include "pfCamera/plVirtualCamNeu.h" #include "pfCamera/plVirtualCamNeu.h"
#include "plDXBufferRefs.h" #include "plDXBufferRefs.h"
@ -158,7 +158,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKey.h"
#endif #endif
#include "plCullTree.h" #include "plPipeline/plCullTree.h"
#include "plTweak.h" #include "plTweak.h"

8
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h

@ -47,19 +47,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plSurface/plLayerInterface.h" #include "plSurface/plLayerInterface.h"
#include "hsMatrix44.h" #include "hsMatrix44.h"
#include "plFogEnvironment.h" #include "plPipeline/plFogEnvironment.h"
#include "hsG3DDeviceSelector.h" #include "plPipeline/hsG3DDeviceSelector.h"
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "hsColorRGBA.h" #include "hsColorRGBA.h"
#include "hsGDeviceRef.h" #include "plPipeline/hsGDeviceRef.h"
#include "hsPoint2.h" #include "hsPoint2.h"
class plAccessSpan; class plAccessSpan;
class plAuxSpan; class plAuxSpan;
class plVertexSpan; class plVertexSpan;
#include "plPlates.h" // Used to define plDXPlateManager #include "plPipeline/plPlates.h" // Used to define plDXPlateManager
//// Defines and Konstants and Other Nifty Stuff ////////////////////////////// //// Defines and Konstants and Other Nifty Stuff //////////////////////////////

0
Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPixelShader.cpp

0
Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPixelShader.h

0
Sources/Plasma/PubUtilLib/plPipeline/plDXRenderTargetRef.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXRenderTargetRef.h

10
Sources/Plasma/PubUtilLib/plPipeline/plDXSettings.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXSettings.h

@ -54,16 +54,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plDXSettings_h #define _plDXSettings_h
#include "hsMatrix44.h" #include "hsMatrix44.h"
#include "plFogEnvironment.h" #include "plPipeline/plFogEnvironment.h"
#include "hsGeometry3.h" #include "hsGeometry3.h"
#include "hsTemplates.h" #include "hsTemplates.h"
#include "hsColorRGBA.h" #include "hsColorRGBA.h"
#include "hsBitVector.h" #include "hsBitVector.h"
#include "plStencil.h" #include "plPipeline/plStencil.h"
#include "hsPoint2.h" #include "hsPoint2.h"
#include "plCullTree.h" #include "plPipeline/plCullTree.h"
#include "hsWinRef.h" #include "plPipeline/hsWinRef.h"
#include "plViewTransform.h" #include "plPipeline/plViewTransform.h"
//// General Settings ///////////////////////////////////////////////////////// //// General Settings /////////////////////////////////////////////////////////

0
Sources/Plasma/PubUtilLib/plPipeline/plDXShader.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXShader.cpp

0
Sources/Plasma/PubUtilLib/plPipeline/plDXShader.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXShader.h

2
Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextFont.cpp

@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <ddraw.h> #include <ddraw.h>
#include <d3dx9mesh.h> #include <d3dx9mesh.h>
#include "hsWinRef.h" #include "plPipeline/hsWinRef.h"
#include "plDXTextFont.h" #include "plDXTextFont.h"
#include "plDXPipeline.h" #include "plDXPipeline.h"

2
Sources/Plasma/PubUtilLib/plPipeline/plDXTextFont.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextFont.h

@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plDXTextFont_h #ifndef _plDXTextFont_h
#define _plDXTextFont_h #define _plDXTextFont_h
#include "plTextFont.h" #include "plPipeline/plTextFont.h"
//#include "hsGDirect3DTnLDevice.h" //#include "hsGDirect3DTnLDevice.h"

0
Sources/Plasma/PubUtilLib/plPipeline/plDXTextureRef.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXTextureRef.h

2
Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXVertexShader.cpp

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plSurface/plShader.h" #include "plSurface/plShader.h"
#include "plGBufferGroup.h" #include "plPipeline/plGBufferGroup.h"
#include "plDXPipeline.h" #include "plDXPipeline.h"
plDXVertexShader::plDXVertexShader(plShader* owner) plDXVertexShader::plDXVertexShader(plShader* owner)

0
Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.h → Sources/Plasma/PubUtilLib/plPipeline/DX/plDXVertexShader.h

4
Sources/Plasma/PubUtilLib/plPipeline/hsGDDrawDllLoad.cpp

@ -40,6 +40,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#ifdef HS_BUILD_FOR_WIN32
#include "hsWindows.h" #include "hsWindows.h"
#include <ddraw.h> #include <ddraw.h>
@ -72,3 +74,5 @@ HMODULE hsGDDrawDllLoad::GetD3DDll()
{ {
return staticDllLoad.fD3DDll; return staticDllLoad.fD3DDll;
} }
#endif //HS_BUILD_FOR_WIN32

2
Sources/Plasma/PubUtilLib/plPipeline/plPipelineCreatable.h

@ -47,7 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <d3d9.h> #include <d3d9.h>
#include "plDXPipeline.h" #include "DX/plDXPipeline.h"
REGISTER_NONCREATABLE( plDXPipeline ); REGISTER_NONCREATABLE( plDXPipeline );

4
Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp

@ -76,6 +76,7 @@ plTextFont::~plTextFont()
uint16_t *plTextFont::IInitFontTexture( void ) uint16_t *plTextFont::IInitFontTexture( void )
{ {
#ifdef HS_BUILD_FOR_WIN32
int nHeight, x, y, c; int nHeight, x, y, c;
char myChar[ 2 ] = "x"; char myChar[ 2 ] = "x";
uint16_t *tBits; uint16_t *tBits;
@ -190,6 +191,9 @@ uint16_t *plTextFont::IInitFontTexture( void )
DeleteObject( hFont ); DeleteObject( hFont );
return data; return data;
#else
return nullptr;
#endif
} }
//// Create /////////////////////////////////////////////////////////////////// //// Create ///////////////////////////////////////////////////////////////////

4
Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp

@ -203,6 +203,8 @@ uint32_t *plTextGenerator::IAllocateOSSurface( uint16_t width, uint16_t hei
SelectObject( fWinAlphaDC, fWinAlphaBitmap ); SelectObject( fWinAlphaDC, fWinAlphaBitmap );
return (uint32_t *)fWinRGBBits; return (uint32_t *)fWinRGBBits;
#else
return 0;
#endif #endif
} }
@ -448,6 +450,8 @@ uint16_t plTextGenerator::CalcStringWidth( const wchar_t *text, uint16_t *h
*height = (uint16_t)size.cy; *height = (uint16_t)size.cy;
return (uint16_t)size.cx; return (uint16_t)size.cx;
#else
return 0;
#endif #endif
} }

Loading…
Cancel
Save