diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 9a5934e018..bad0d467a6 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -29,8 +29,9 @@ add_subdirectory(src/gsgbase) add_subdirectory(src/pnmimage) add_subdirectory(src/gobj) add_subdirectory(src/pgraph) +add_subdirectory(src/pgraphnodes) add_subdirectory(src/cull) -#add_subdirectory(src/display) +add_subdirectory(src/display) #add_subdirectory(src/framework) #add_subdirectory(src/testbed) diff --git a/panda/src/display/CMakeLists.txt b/panda/src/display/CMakeLists.txt new file mode 100644 index 0000000000..b9f9813cc3 --- /dev/null +++ b/panda/src/display/CMakeLists.txt @@ -0,0 +1,113 @@ +set(P3DISPLAY_HEADERS + standardMunger.I standardMunger.h + config_display.h + callbackGraphicsWindow.I callbackGraphicsWindow.h + drawableRegion.I drawableRegion.h + displayRegion.I displayRegion.h + displayRegionCullCallbackData.I displayRegionCullCallbackData.h + displayRegionDrawCallbackData.I displayRegionDrawCallbackData.h + frameBufferProperties.I frameBufferProperties.h + get_x11.h pre_x11_include.h post_x11_include.h + graphicsEngine.I graphicsEngine.h + graphicsOutput.I graphicsOutput.h + graphicsBuffer.I graphicsBuffer.h + graphicsDevice.h graphicsDevice.I + graphicsPipe.I graphicsPipe.h + graphicsPipeSelection.I graphicsPipeSelection.h + graphicsStateGuardian.I graphicsStateGuardian.h + graphicsThreadingModel.I graphicsThreadingModel.h + graphicsWindow.I graphicsWindow.h + graphicsWindowInputDevice.I graphicsWindowInputDevice.h + graphicsWindowProc.h + graphicsWindowProcCallbackData.I graphicsWindowProcCallbackData.h + lru.h + nativeWindowHandle.I nativeWindowHandle.h + parasiteBuffer.I parasiteBuffer.h + windowHandle.I windowHandle.h + windowProperties.I windowProperties.h + renderBuffer.h + stencilRenderStates.h + stereoDisplayRegion.I stereoDisplayRegion.h + displaySearchParameters.h + displayInformation.h + subprocessWindow.h subprocessWindow.I + touchInfo.h +) + +set(P3DISPLAY_SOURCES + standardMunger.cxx + config_display.cxx + callbackGraphicsWindow.cxx + drawableRegion.cxx + displayRegion.cxx + displayRegionCullCallbackData.cxx + displayRegionDrawCallbackData.cxx + displaySearchParameters.cxx + displayInformation.cxx + frameBufferProperties.cxx + graphicsEngine.cxx + graphicsOutput.cxx + graphicsBuffer.cxx + graphicsPipe.cxx + graphicsPipeSelection.cxx + graphicsStateGuardian.cxx + graphicsThreadingModel.cxx + graphicsWindow.cxx graphicsWindowInputDevice.cxx + graphicsWindowProc.cxx + graphicsWindowProcCallbackData.cxx + graphicsDevice.cxx + lru.cxx + nativeWindowHandle.cxx + parasiteBuffer.cxx + windowHandle.cxx + windowProperties.cxx + stencilRenderStates.cxx + stereoDisplayRegion.cxx + subprocessWindow.cxx + touchInfo.cxx +) + +if(HAVE_PYTHON) + set(P3DISPLAY_HEADERS + ${P3DISPLAY_HEADERS} + pythonGraphicsWindowProc.h + ) + set(P3DISPLAY_SOURCES + ${P3DISPLAY_SOURCES} + pythonGraphicsWindowProc.cxx + ) +endif() + +if(OSX_PLATFORM) + set(P3DISPLAY_HEADER + ${P3DISPLAY_HEADERS} + subprocessWindowBuffer.h + subprocessWindowBuffer.I + ) +endif() + +composite_sources(p3display P3DISPLAY_SOURCES) +add_library(p3display ${P3DISPLAY_HEADERS} ${P3DISPLAY_SOURCES}) +target_link_libraries(p3display p3cull p3pgraphnodes) +target_interrogate(p3display ALL) + +if(OSX_PLATFORM AND HAVE_P3D_PLUGIN) + # We build a static library of just these files, so the plugin can + # link with it in direct/src/plugin, without pulling in the rest of + # Panda. + add_library(p3subprocbuffer + subprocessWindowBuffer.h + subprocessWindowBuffer.I + subprocessWindowBuffer.cxx + ) +endif() + +#begin test_bin_target + #define TARGET test_display + #define LOCAL_LIBS \ +# p3display p3putil + + #define SOURCES \ +# test_display.cxx + +#end test_bin_target diff --git a/panda/src/display/displayRegionDrawCallbackData.cxx b/panda/src/display/displayRegionDrawCallbackData.cxx index b108edab11..07e2242463 100644 --- a/panda/src/display/displayRegionDrawCallbackData.cxx +++ b/panda/src/display/displayRegionDrawCallbackData.cxx @@ -13,7 +13,12 @@ //////////////////////////////////////////////////////////////////// #include "displayRegionDrawCallbackData.h" + +#include "config_display.h" #include "cullResult.h" +#include "displayRegion.h" +#include "graphicsOutput.h" +#include "graphicsStateGuardian.h" #include "sceneSetup.h" TypeHandle DisplayRegionDrawCallbackData::_type_handle; diff --git a/panda/src/display/drawableRegion.cxx b/panda/src/display/drawableRegion.cxx index b7d03bf339..67188080bd 100644 --- a/panda/src/display/drawableRegion.cxx +++ b/panda/src/display/drawableRegion.cxx @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include "drawableRegion.h" +#include "config_display.h" //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 2b036f5beb..b42c27d13c 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -46,6 +46,7 @@ #include "config_pgraph.h" #include "displayRegionCullCallbackData.h" #include "displayRegionDrawCallbackData.h" +#include "callbackGraphicsWindow.h" #if defined(WIN32) #define WINDOWS_LEAN_AND_MEAN diff --git a/panda/src/display/graphicsWindowInputDevice.cxx b/panda/src/display/graphicsWindowInputDevice.cxx index e6f9fdf483..d1fd8b4cfb 100644 --- a/panda/src/display/graphicsWindowInputDevice.cxx +++ b/panda/src/display/graphicsWindowInputDevice.cxx @@ -14,6 +14,7 @@ #include "graphicsWindowInputDevice.h" +#include "graphicsWindow.h" #include "mouseButton.h" #include "keyboardButton.h" diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index 367feebd26..4ded5e964b 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -28,6 +28,8 @@ #include "lightMutex.h" #include "lightMutexHolder.h" +// Forward declarations +class GraphicsWindow; //////////////////////////////////////////////////////////////////// // Class : GraphicsWindowInputDevice diff --git a/panda/src/display/graphicsWindowProcCallbackData.cxx b/panda/src/display/graphicsWindowProcCallbackData.cxx index 684efcbcfb..aab668839b 100644 --- a/panda/src/display/graphicsWindowProcCallbackData.cxx +++ b/panda/src/display/graphicsWindowProcCallbackData.cxx @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include "graphicsWindowProcCallbackData.h" +#include "graphicsWindow.h" TypeHandle GraphicsWindowProcCallbackData::_type_handle; diff --git a/panda/src/display/lru.cxx b/panda/src/display/lru.cxx index f9361ceaac..b93fb500b0 100644 --- a/panda/src/display/lru.cxx +++ b/panda/src/display/lru.cxx @@ -21,6 +21,9 @@ //#include #include "lru.h" +#if ENABLE_MUTEX +#include "mutexHolder.h" +#endif static const int HIGH_PRIORITY_SCALE = 4;