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 12 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. 6
      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
plDebugText.cpp
plDTProgressMgr.cpp
plDXEnumerate.cpp
plDXPipeline.cpp
plDXPixelShader.cpp
plDXShader.cpp
plDXTextFont.cpp
plDXVertexShader.cpp
plDynamicEnvMap.cpp
plFogEnvironment.cpp
plGBufferGroup.cpp
@ -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
@ -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
@ -76,18 +74,26 @@ 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})
source_group("Source Files" FILES ${plPipeline_SOURCES} ${plDXPipeline_SOURCES})
source_group("Header Files" FILES ${plPipeline_HEADERS} ${plDXPipeline_HEADERS})

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
#include "HeadSpin.h"
#include "hsGDeviceRef.h"
#include "plPipeline/hsGDeviceRef.h"
//// 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 <ddraw.h>
#include "hsWinRef.h"
#include "plPipeline/hsWinRef.h"
#include "plDXPipeline.h"
#include "plDXDeviceRef.h"
@ -64,13 +64,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#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"

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 <ddraw.h>
#include "hsGDDrawDllLoad.h"
#include "hsG3DDeviceSelector.h"
#include "plPipeline/hsGDDrawDllLoad.h"
#include "plPipeline/hsG3DDeviceSelector.h"
//// 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>
#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"
@ -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"
@ -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"

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 "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 //////////////////////////////

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
#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 "plViewTransform.h"
#include "plPipeline/plCullTree.h"
#include "plPipeline/hsWinRef.h"
#include "plPipeline/plViewTransform.h"
//// 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 <d3dx9mesh.h>
#include "hsWinRef.h"
#include "plPipeline/hsWinRef.h"
#include "plDXTextFont.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
#define _plDXTextFont_h
#include "plTextFont.h"
#include "plPipeline/plTextFont.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 "plGBufferGroup.h"
#include "plPipeline/plGBufferGroup.h"
#include "plDXPipeline.h"
plDXVertexShader::plDXVertexShader(plShader* owner)

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

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

@ -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>
@ -71,4 +73,6 @@ hsGDDrawDllLoad::~hsGDDrawDllLoad()
HMODULE hsGDDrawDllLoad::GetD3DDll()
{
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 "plDXPipeline.h"
#include "DX/plDXPipeline.h"
REGISTER_NONCREATABLE( plDXPipeline );

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

@ -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;
@ -190,6 +191,9 @@ uint16_t *plTextFont::IInitFontTexture( void )
DeleteObject( hFont );
return data;
#else
return nullptr;
#endif
}
//// 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 );
return (uint32_t *)fWinRGBBits;
#else
return 0;
#endif
}
@ -448,6 +450,8 @@ uint16_t plTextGenerator::CalcStringWidth( const wchar_t *text, uint16_t *h
*height = (uint16_t)size.cy;
return (uint16_t)size.cx;
#else
return 0;
#endif
}

Loading…
Cancel
Save