Browse Source

Add CMakeLists for panda/display

kestred 12 years ago
parent
commit
a4e48359da

+ 2 - 1
panda/CMakeLists.txt

@@ -29,8 +29,9 @@ add_subdirectory(src/gsgbase)
 add_subdirectory(src/pnmimage)
 add_subdirectory(src/pnmimage)
 add_subdirectory(src/gobj)
 add_subdirectory(src/gobj)
 add_subdirectory(src/pgraph)
 add_subdirectory(src/pgraph)
+add_subdirectory(src/pgraphnodes)
 add_subdirectory(src/cull)
 add_subdirectory(src/cull)
 
 
-#add_subdirectory(src/display)
+add_subdirectory(src/display)
 #add_subdirectory(src/framework)
 #add_subdirectory(src/framework)
 #add_subdirectory(src/testbed)
 #add_subdirectory(src/testbed)

+ 113 - 0
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

+ 5 - 0
panda/src/display/displayRegionDrawCallbackData.cxx

@@ -13,7 +13,12 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "displayRegionDrawCallbackData.h"
 #include "displayRegionDrawCallbackData.h"
+
+#include "config_display.h"
 #include "cullResult.h"
 #include "cullResult.h"
+#include "displayRegion.h"
+#include "graphicsOutput.h"
+#include "graphicsStateGuardian.h"
 #include "sceneSetup.h"
 #include "sceneSetup.h"
 
 
 TypeHandle DisplayRegionDrawCallbackData::_type_handle;
 TypeHandle DisplayRegionDrawCallbackData::_type_handle;

+ 1 - 0
panda/src/display/drawableRegion.cxx

@@ -13,6 +13,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "drawableRegion.h"
 #include "drawableRegion.h"
+#include "config_display.h"
 
 
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 1 - 0
panda/src/display/graphicsEngine.cxx

@@ -46,6 +46,7 @@
 #include "config_pgraph.h"
 #include "config_pgraph.h"
 #include "displayRegionCullCallbackData.h"
 #include "displayRegionCullCallbackData.h"
 #include "displayRegionDrawCallbackData.h"
 #include "displayRegionDrawCallbackData.h"
+#include "callbackGraphicsWindow.h"
 
 
 #if defined(WIN32)
 #if defined(WIN32)
   #define WINDOWS_LEAN_AND_MEAN
   #define WINDOWS_LEAN_AND_MEAN

+ 1 - 0
panda/src/display/graphicsWindowInputDevice.cxx

@@ -14,6 +14,7 @@
 
 
 
 
 #include "graphicsWindowInputDevice.h"
 #include "graphicsWindowInputDevice.h"
+#include "graphicsWindow.h"
 #include "mouseButton.h"
 #include "mouseButton.h"
 #include "keyboardButton.h"
 #include "keyboardButton.h"
 
 

+ 2 - 0
panda/src/display/graphicsWindowInputDevice.h

@@ -28,6 +28,8 @@
 #include "lightMutex.h"
 #include "lightMutex.h"
 #include "lightMutexHolder.h"
 #include "lightMutexHolder.h"
 
 
+// Forward declarations
+class GraphicsWindow;
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //       Class : GraphicsWindowInputDevice
 //       Class : GraphicsWindowInputDevice

+ 1 - 0
panda/src/display/graphicsWindowProcCallbackData.cxx

@@ -13,6 +13,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "graphicsWindowProcCallbackData.h"
 #include "graphicsWindowProcCallbackData.h"
+#include "graphicsWindow.h"
 
 
 TypeHandle GraphicsWindowProcCallbackData::_type_handle;
 TypeHandle GraphicsWindowProcCallbackData::_type_handle;
 
 

+ 3 - 0
panda/src/display/lru.cxx

@@ -21,6 +21,9 @@
 //#include <windows.h>
 //#include <windows.h>
 
 
 #include "lru.h"
 #include "lru.h"
+#if ENABLE_MUTEX
+#include "mutexHolder.h"
+#endif
 
 
 
 
 static const int HIGH_PRIORITY_SCALE = 4;
 static const int HIGH_PRIORITY_SCALE = 4;