From 4ef51228a3f8f655a232a27b3df7ea04595e2b64 Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Thu, 29 Jan 2004 03:28:53 +0000 Subject: [PATCH] implemented directx 9 support for panda --- panda/metalibs/pandadx9/Sources.pp | 24 +++++++++++++++++ panda/metalibs/pandadx9/pandadx9.cxx | 21 +++++++++++++++ panda/metalibs/pandadx9/pandadx9.h | 13 ++++++++++ panda/src/dxgsg9/Sources.pp | 39 ++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100755 panda/metalibs/pandadx9/Sources.pp create mode 100755 panda/metalibs/pandadx9/pandadx9.cxx create mode 100755 panda/metalibs/pandadx9/pandadx9.h create mode 100755 panda/src/dxgsg9/Sources.pp diff --git a/panda/metalibs/pandadx9/Sources.pp b/panda/metalibs/pandadx9/Sources.pp new file mode 100755 index 0000000000..5e14560049 --- /dev/null +++ b/panda/metalibs/pandadx9/Sources.pp @@ -0,0 +1,24 @@ +#define BUILD_DIRECTORY $[HAVE_DX] + +// DIR_TYPE "metalib" indicates we are building a shared library that +// consists mostly of references to other shared libraries. Under +// Windows, this directly produces a DLL (as opposed to the regular +// src libraries, which don't produce anything but a pile of OBJ files +// under Windows). + +#define DIR_TYPE metalib +#define BUILDING_DLL BUILDING_PANDADX + +#define COMPONENT_LIBS \ + dxgsg9 +#define LOCAL_LIBS gsgbase display express gobj +#define OTHER_LIBS dtoolconfig dtool + +#begin metalib_target + #define TARGET pandadx9 + #define SOURCES pandadx9.cxx + #define WIN_SYS_LIBS \ + ddraw.lib dxguid.lib winmm.lib \ + kernel32.lib gdi32.lib user32.lib advapi32.lib $[WIN_SYS_LIBS] +#end metalib_target + diff --git a/panda/metalibs/pandadx9/pandadx9.cxx b/panda/metalibs/pandadx9/pandadx9.cxx new file mode 100755 index 0000000000..a86be20fd2 --- /dev/null +++ b/panda/metalibs/pandadx9/pandadx9.cxx @@ -0,0 +1,21 @@ +// Filename: pandadx.cxx +// Created by: masad (15Jan04) +// +//////////////////////////////////////////////////////////////////// + +#include "pandadx9.h" + +#include "config_dxgsg9.h" + +//////////////////////////////////////////////////////////////////// +// Function: init_libpandadx +// Description: Initializes the library. This must be called at +// least once before any of the functions or classes in +// this library can be used. Normally it will be +// called by the static initializers and need not be +// called explicitly, but special cases exist. +//////////////////////////////////////////////////////////////////// +void +init_libpandadx9() { + init_libdxgsg9(); +} diff --git a/panda/metalibs/pandadx9/pandadx9.h b/panda/metalibs/pandadx9/pandadx9.h new file mode 100755 index 0000000000..dd79e80aba --- /dev/null +++ b/panda/metalibs/pandadx9/pandadx9.h @@ -0,0 +1,13 @@ +// Filename: pandadx.h +// Created by: masad (15Jan04) +// +//////////////////////////////////////////////////////////////////// + +#ifndef PANDADX9_H +#define PANDADX9_H + +#include "pandabase.h" + +EXPCL_PANDADX void init_libpandadx9(); + +#endif diff --git a/panda/src/dxgsg9/Sources.pp b/panda/src/dxgsg9/Sources.pp new file mode 100755 index 0000000000..f5561f55e8 --- /dev/null +++ b/panda/src/dxgsg9/Sources.pp @@ -0,0 +1,39 @@ +#define BUILD_DIRECTORY $[HAVE_DX] + +#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ + dtoolutil:c dtoolbase:c dtool:m +#define USE_PACKAGES dx + +#begin lib_target + #define TARGET dxgsg9 + #define LOCAL_LIBS \ + gsgmisc gsgbase gobj display windisplay \ + putil linmath mathutil pnmimage event + + #define COMBINED_SOURCES $[TARGET]_composite1.cxx + + // need to install these due to external projects that link directly with libpandadx (bartop) + #define INSTALL_HEADERS \ + dxgsg9base.h config_dxgsg9.h dxGraphicsStateGuardian9.I dxGraphicsStateGuardian9.h \ + dxTextureContext9.h dxGeomNodeContext9.h dxGeomNodeContext9.I d3dfont9.h \ + dxGraphicsDevice9.h + + // build dxGraphicsStateGuardian separately since its so big + + #define SOURCES \ + dxGraphicsStateGuardian9.cxx dxSavedFrameBuffer9.I dxSavedFrameBuffer9.h \ + dxGraphicsDevice9.h \ + wdxGraphicsPipe9.I wdxGraphicsPipe9.h \ + wdxGraphicsWindow9.I wdxGraphicsWindow9.h \ + $[INSTALL_HEADERS] + + #define INCLUDED_SOURCES \ + config_dxgsg9.cxx \ + dxSavedFrameBuffer9.cxx dxTextureContext9.cxx \ + dxGeomNodeContext9.cxx \ + d3dfont9.cxx \ + dxGraphicsDevice9.cxx \ + wdxGraphicsPipe9.cxx wdxGraphicsWindow9.cxx + + +#end lib_target