*** empty log message ***
This commit is contained in:
parent
c200a7133e
commit
39264cbbbc
|
|
@ -64,12 +64,23 @@
|
|||
#endif
|
||||
#defer CFLAGS_SHARED
|
||||
|
||||
// Define LINK_ALL_STATIC to generate static libs instead of DLL's.
|
||||
#if $[LINK_ALL_STATIC]
|
||||
#define dlink_all_static LINK_ALL_STATIC
|
||||
#define build_dlls
|
||||
#define dlllib lib
|
||||
#else
|
||||
#define dlink_all_static
|
||||
#define build_dlls yes
|
||||
#define dlllib dll
|
||||
#endif
|
||||
|
||||
#defer OPTFLAGS /O2 /Ob1 /Ogity /G6
|
||||
|
||||
#defer CDEFINES_OPT1 _DEBUG
|
||||
#defer CDEFINES_OPT2 _DEBUG
|
||||
#defer CDEFINES_OPT3
|
||||
#defer CDEFINES_OPT4 NDEBUG
|
||||
#defer CDEFINES_OPT1 _DEBUG $[dlink_all_static]
|
||||
#defer CDEFINES_OPT2 _DEBUG $[dlink_all_static]
|
||||
#defer CDEFINES_OPT3 $[dlink_all_static]
|
||||
#defer CDEFINES_OPT4 NDEBUG $[dlink_all_static]
|
||||
|
||||
#defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=/D%] /MDd /Gi- /GZ /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
|
||||
#defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=/D%] /MDd /Gi- /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
|
||||
|
|
@ -108,3 +119,10 @@
|
|||
|
||||
#defer LINK_BIN_C link /nologo $[LDFLAGS_OPT$[OPTIMIZE]] $[sources] $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]] /OUT:"$[osfilename $[target]]"
|
||||
#defer LINK_BIN_C++ $[LINK_BIN_C]
|
||||
|
||||
#if $[LINK_ALL_STATIC]
|
||||
#defer SHARED_LIB_C $[STATIC_LIB_C]
|
||||
#defer SHARED_LIB_C++ $[STATIC_LIB_C++]
|
||||
#defer ODIR_SHARED $[ODIR_STATIC]
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -461,55 +461,55 @@
|
|||
#defun get_lpath
|
||||
#define alt_lpath $[nspr_lpath] $[python_lpath]
|
||||
|
||||
#if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs]],]
|
||||
#if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[crypto_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_ZLIB] $[components $[USE_ZLIB],$[active_component_libs]],]
|
||||
#if $[ne $[USE_ZLIB] $[components $[USE_ZLIB],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[zlib_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_GL] $[components $[USE_GL],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GL] $[components $[USE_GL],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[gl_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_GLX] $[components $[USE_GLX],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GLX] $[components $[USE_GLX],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[glx_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_GLUT] $[components $[USE_GLUT],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GLUT] $[components $[USE_GLUT],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[glut_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_DX] $[components $[USE_DX],$[active_component_libs]],]
|
||||
#if $[ne $[USE_DX] $[components $[USE_DX],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[dx_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_SOXST] $[components $[USE_SOXST],$[active_component_libs]],]
|
||||
#if $[ne $[USE_SOXST] $[components $[USE_SOXST],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[soxst_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_IPC] $[components $[USE_IPC],$[active_component_libs]],]
|
||||
#if $[ne $[USE_IPC] $[components $[USE_IPC],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[ipc_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_NET] $[components $[USE_NET],$[active_component_libs]],]
|
||||
#if $[ne $[USE_NET] $[components $[USE_NET],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[net_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_JPEG] $[components $[USE_JPEG],$[active_component_libs]],]
|
||||
#if $[ne $[USE_JPEG] $[components $[USE_JPEG],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[jpeg_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_TIFF] $[components $[USE_TIFF],$[active_component_libs]],]
|
||||
#if $[ne $[USE_TIFF] $[components $[USE_TIFF],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[tiff_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs]],]
|
||||
#if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[fftw_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
|
||||
#if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[vrpn_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
|
||||
#if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[audio_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_MIKMOD] $[components $[USE_MIKMOD],$[active_component_libs]],]
|
||||
#if $[ne $[USE_MIKMOD] $[components $[USE_MIKMOD],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[mikmod_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[gtkmm_lpath]
|
||||
#endif
|
||||
#if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs]],]
|
||||
#if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_lpath $[alt_lpath] $[maya_lpath]
|
||||
#endif
|
||||
|
||||
|
|
@ -524,59 +524,59 @@
|
|||
#defun get_libs
|
||||
#define alt_libs $[nspr_libs] $[python_libs]
|
||||
|
||||
#if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs]],]
|
||||
#if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[crypto_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_ZLIB] $[components $[USE_ZLIB],$[active_component_libs]],]
|
||||
#if $[ne $[USE_ZLIB] $[components $[USE_ZLIB],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[zlib_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_GL] $[components $[USE_GL],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GL] $[components $[USE_GL],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[gl_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_GLX] $[components $[USE_GLX],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GLX] $[components $[USE_GLX],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[glx_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_GLUT] $[components $[USE_GLUT],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GLUT] $[components $[USE_GLUT],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[glut_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_DX] $[components $[USE_DX],$[active_component_libs]],]
|
||||
#if $[ne $[USE_DX] $[components $[USE_DX],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[dx_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_SOXST] $[components $[USE_SOXST],$[active_component_libs]],]
|
||||
#if $[ne $[USE_SOXST] $[components $[USE_SOXST],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[soxst_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_IPC] $[components $[USE_IPC],$[active_component_libs]],]
|
||||
#if $[ne $[USE_IPC] $[components $[USE_IPC],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[ipc_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_NET] $[components $[USE_NET],$[active_component_libs]],]
|
||||
#if $[ne $[USE_NET] $[components $[USE_NET],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[net_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_JPEG] $[components $[USE_JPEG],$[active_component_libs]],]
|
||||
#if $[ne $[USE_JPEG] $[components $[USE_JPEG],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[jpeg_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_TIFF] $[components $[USE_TIFF],$[active_component_libs]],]
|
||||
#if $[ne $[USE_TIFF] $[components $[USE_TIFF],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[tiff_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs]],]
|
||||
#if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[fftw_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
|
||||
#if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[vrpn_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
|
||||
#if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[audio_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_MIKMOD] $[components $[USE_MIKMOD],$[active_component_libs]],]
|
||||
#if $[ne $[USE_MIKMOD] $[components $[USE_MIKMOD],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[mikmod_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs]],]
|
||||
#if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[gtkmm_libs]
|
||||
#endif
|
||||
#if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs]],]
|
||||
#if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs] $[transitive_link]],]
|
||||
#set alt_libs $[alt_libs] $[maya_libs]
|
||||
#endif
|
||||
#if $[UNIX_PLATFORM]
|
||||
#set alt_libs $[alt_libs] $[UNIX_SYS_LIBS] $[components $[UNIX_SYS_LIBS],$[active_component_libs]]
|
||||
#set alt_libs $[alt_libs] $[UNIX_SYS_LIBS] $[components $[UNIX_SYS_LIBS],$[active_component_libs] $[transitive_link]]
|
||||
#endif
|
||||
|
||||
$[alt_libs]
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
// $[bin_targets] the list of binaries. $[test_bin_targets] is the
|
||||
// list of binaries that are to be built only when specifically asked
|
||||
// for.
|
||||
#define lib_targets $[patsubst %,$[so_dir]\lib%$[dllext].dll,$[active_target(metalib_target noinst_lib_target)] $[real_lib_targets]]
|
||||
#define lib_targets $[patsubst %,$[so_dir]\lib%$[dllext].$[dlllib],$[active_target(metalib_target noinst_lib_target)] $[real_lib_targets]]
|
||||
#define static_lib_targets $[active_target(static_lib_target ss_lib_target):%=$[st_dir]\lib%$[dllext].lib]
|
||||
#define bin_targets \
|
||||
$[active_target(bin_target noinst_bin_target):%=$[st_dir]\%.exe] \
|
||||
|
|
@ -322,7 +322,7 @@ $[osfilename $[directory]] :
|
|||
$[components $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[RELDIR]\$[so_dir]\%.obj,%,,$[get_sources] $[get_igateoutput]]],$[active_component_libs]]
|
||||
#define varname $[subst -,_,lib$[TARGET]_so]
|
||||
$[varname] = $[osfilename $[sources]]
|
||||
#define target $[so_dir]\lib$[TARGET]$[dllext].dll
|
||||
#define target $[so_dir]\lib$[TARGET]$[dllext].$[dlllib]
|
||||
#define sources $($[varname])
|
||||
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
|
||||
$[target] : $[sources] "$[dtool_ver_dir]\version.rc"
|
||||
|
|
@ -336,7 +336,9 @@ $[target] : $[sources] "$[dtool_ver_dir]\version.rc"
|
|||
$[SHARED_LIB_C]
|
||||
#endif
|
||||
|
||||
#if $[build_dlls]
|
||||
$[so_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].dll
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -344,7 +346,7 @@ $[so_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].dll
|
|||
// everything that goes along with it.
|
||||
#define installed_files \
|
||||
$[if $[build_it], \
|
||||
$[install_lib_dir]\lib$[TARGET]$[dllext].dll \
|
||||
$[if $[build_dlls],$[install_lib_dir]\lib$[TARGET]$[dllext].dll] \
|
||||
$[install_lib_dir]\lib$[TARGET]$[dllext].lib \
|
||||
] \
|
||||
$[INSTALL_SCRIPTS:%=$[install_bin_dir]\%] \
|
||||
|
|
@ -360,10 +362,12 @@ uninstall-lib$[TARGET] :
|
|||
-del /f $[file]
|
||||
#end file
|
||||
|
||||
#if $[build_dlls]
|
||||
$[install_lib_dir]\lib$[TARGET]$[dllext].dll : $[so_dir]\lib$[TARGET]$[dllext].dll
|
||||
#define local lib$[TARGET]$[dllext].dll
|
||||
#define dest $[install_lib_dir]
|
||||
copy $[so_dir]\$[local] $[dest]
|
||||
#endif
|
||||
|
||||
$[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].lib
|
||||
#define local lib$[TARGET]$[dllext].lib
|
||||
|
|
@ -439,7 +443,7 @@ $[target] : $[source]
|
|||
#forscopes noinst_lib_target
|
||||
#define varname $[subst -,_,lib$[TARGET]_so]
|
||||
$[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources]]]]
|
||||
#define target $[so_dir]\lib$[TARGET]$[dllext].dll
|
||||
#define target $[so_dir]\lib$[TARGET]$[dllext].$[dlllib]
|
||||
#define sources $($[varname])
|
||||
$[target] : $[sources]
|
||||
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
|
||||
|
|
@ -448,7 +452,9 @@ $[target] : $[sources]
|
|||
$[SHARED_LIB_C]
|
||||
#endif
|
||||
|
||||
#if $[build_dlls]
|
||||
$[so_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].dll
|
||||
#endif
|
||||
|
||||
#end noinst_lib_target
|
||||
|
||||
|
|
@ -541,6 +547,7 @@ $[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.
|
|||
#define target $[st_dir]\$[TARGET].exe
|
||||
#define sources $($[varname])
|
||||
#define ld $[get_ld]
|
||||
#define transitive_link $[complete_local_libs]
|
||||
$[target] : $[sources]
|
||||
#if $[ld]
|
||||
// If there's a custom linker defined for the target, we have to use it.
|
||||
|
|
@ -553,6 +560,7 @@ $[target] : $[sources]
|
|||
$[LINK_BIN_C]
|
||||
#endif
|
||||
#endif
|
||||
#define transitive_link
|
||||
|
||||
#define installed_files \
|
||||
$[install_bin_dir]\$[TARGET].exe \
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ using namespace std;
|
|||
#define INLINE inline
|
||||
#define TYPENAME typename
|
||||
|
||||
#ifdef WIN32_VC
|
||||
#if defined(WIN32_VC) && !defined(LINK_ALL_STATIC)
|
||||
// This macro must be used to export an instantiated template class
|
||||
// from a DLL. If the template class name itself contains commas, it
|
||||
// may be necessary to first define a macro for the class name, to
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#define EXPCL_EMPTY
|
||||
|
||||
#if defined(WIN32_VC) && !defined(CPPPARSER)
|
||||
#if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
|
||||
|
||||
#ifdef BUILDING_DTOOL
|
||||
#define EXPCL_DTOOL __declspec(dllexport)
|
||||
|
|
|
|||
|
|
@ -24,5 +24,6 @@
|
|||
#begin metalib_target
|
||||
#define TARGET panda
|
||||
|
||||
#define SOURCES panda.cxx
|
||||
#define SOURCES panda.cxx panda.h
|
||||
#define INSTALL_HEADERS panda.h
|
||||
#end metalib_target
|
||||
|
|
|
|||
|
|
@ -3,7 +3,25 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This is a dummy file whose sole purpose is to give the compiler
|
||||
// something to compile when making libpanda.so in NO_DEFER mode,
|
||||
// which generates an empty library that itself links with all the
|
||||
// other shared libraries that make up libpanda.
|
||||
#include "panda.h"
|
||||
|
||||
#include <config_device.h>
|
||||
#include <config_graph.h>
|
||||
#include <config_sgraph.h>
|
||||
#include <config_pnmimagetypes.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libpanda
|
||||
// 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_libpanda() {
|
||||
init_libdevice();
|
||||
init_libgraph();
|
||||
init_libsgraph();
|
||||
init_libpnmimagetypes();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// Filename: panda.h
|
||||
// Created by: drose (2Jan01)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PANDA_H
|
||||
#define PANDA_H
|
||||
|
||||
#include <pandabase.h>
|
||||
|
||||
EXPCL_PANDA void init_libpanda();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -3,7 +3,21 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This is a dummy file whose sole purpose is to give the compiler
|
||||
// something to compile when making libpandadx.so in NO_DEFER mode,
|
||||
// which generates an empty library that itself links with all the
|
||||
// other shared libraries that make up libpandadx.
|
||||
#include "pandadx.h"
|
||||
|
||||
#include <config_dxgsg.h>
|
||||
#include <config_wdxdisplay.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_libpandadx() {
|
||||
init_libdxgsg();
|
||||
init_libwdxdisplay();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
// Filename: pandadx.h
|
||||
// Created by: drose (2Jan01)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PANDADX_H
|
||||
#define PANDADX_H
|
||||
|
||||
#include <pandabase.h>
|
||||
|
||||
EXPCL_PANDADX void init_libpandadx();
|
||||
|
||||
#endif
|
||||
|
|
@ -16,5 +16,6 @@
|
|||
#begin metalib_target
|
||||
#define TARGET pandaegg
|
||||
|
||||
#define SOURCES pandaegg.cxx
|
||||
#define SOURCES pandaegg.cxx pandaegg.h
|
||||
#define INSTALL_HEADERS pandaegg.h
|
||||
#end metalib_target
|
||||
|
|
|
|||
|
|
@ -3,7 +3,23 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This is a dummy file whose sole purpose is to give the compiler
|
||||
// something to compile when making libpandaegg.so in NO_DEFER mode,
|
||||
// which generates an empty library that itself links with all the
|
||||
// other shared libraries that make up libpandaegg.
|
||||
#include "pandaegg.h"
|
||||
|
||||
#include <config_egg.h>
|
||||
#include <config_builder.h>
|
||||
#include <config_egg2sg.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libpandaegg
|
||||
// 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_libpandaegg() {
|
||||
init_libegg();
|
||||
init_libbuilder();
|
||||
init_libegg2sg();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// Filename: pandaegg.h
|
||||
// Created by: drose (2Jan01)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PANDAEGG_H
|
||||
#define PANDAEGG_H
|
||||
|
||||
#include <pandabase.h>
|
||||
|
||||
EXPCL_PANDAEGG void init_libpandaegg();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -19,5 +19,8 @@
|
|||
#begin metalib_target
|
||||
#define TARGET pandagl
|
||||
|
||||
#define SOURCES pandagl.cxx
|
||||
#define SOURCES pandagl.cxx pandagl.h
|
||||
|
||||
#define INSTALL_HEADERS pandagl.h
|
||||
|
||||
#end metalib_target
|
||||
|
|
|
|||
|
|
@ -3,7 +3,27 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This is a dummy file whose sole purpose is to give the compiler
|
||||
// something to compile when making libpandagl.so in NO_DEFER mode,
|
||||
// which generates an empty library that itself links with all the
|
||||
// other shared libraries that make up libpandagl.
|
||||
#include "pandagl.h"
|
||||
|
||||
#include <config_glgsg.h>
|
||||
|
||||
#ifdef HAVE_WGL
|
||||
#include <config_wgldisplay.h>
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libpandagl
|
||||
// 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_libpandagl() {
|
||||
init_libglgsg();
|
||||
|
||||
#ifdef HAVE_WGL
|
||||
init_libwgldisplay();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// Filename: pandagl.h
|
||||
// Created by: drose (2Jan01)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PANDAGL_H
|
||||
#define PANDAGL_H
|
||||
|
||||
#include <pandabase.h>
|
||||
|
||||
EXPCL_PANDAGL void init_libpandagl();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -11,4 +11,22 @@ Configure(config_builder);
|
|||
NotifyCategoryDef(builder, "");
|
||||
|
||||
ConfigureFn(config_builder) {
|
||||
init_libbuilder();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libbuilder
|
||||
// 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_libbuilder() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,6 @@
|
|||
|
||||
NotifyCategoryDecl(builder, EXPCL_PANDAEGG, EXPTP_PANDAEGG);
|
||||
|
||||
extern EXPCL_PANDAEGG void init_libbuilder();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ traverse(Node *root,
|
|||
_as_of = UpdateSeq::initial();
|
||||
}
|
||||
}
|
||||
_now = last_graph_update[_graph_type];
|
||||
_now = last_graph_update(_graph_type);
|
||||
_nested_count++;
|
||||
|
||||
if (is_initial) {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#define INSTALL_HEADERS \
|
||||
adinputNode.h analogData.I analogData.h buttonData.I buttonData.h \
|
||||
clientBase.h dialData.I dialData.h mouse.h trackerData.I \
|
||||
trackerData.h trackerNode.h
|
||||
clientBase.h config_device.h dialData.I dialData.h mouse.h \
|
||||
trackerData.I trackerData.h trackerNode.h
|
||||
|
||||
#define IGATESCAN all
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,25 @@ NotifyCategoryDef(device, "");
|
|||
const bool asynchronous_clients = config_device.GetBool("asynchronous-clients", false);
|
||||
|
||||
ConfigureFn(config_device) {
|
||||
init_libdevice();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libdevice
|
||||
// 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_libdevice() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
MouseAndKeyboard::init_type();
|
||||
TrackerNode::init_type();
|
||||
ADInputNode::init_type();
|
||||
|
|
|
|||
|
|
@ -13,4 +13,6 @@ NotifyCategoryDecl(device, EXPCL_PANDA, EXPTP_PANDA);
|
|||
|
||||
extern const bool asynchronous_clients;
|
||||
|
||||
extern EXPCL_PANDA void init_libdevice();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,10 +19,9 @@
|
|||
TypeHandle GraphicsPipe::_type_handle;
|
||||
TypeHandle GraphicsPipe::PipeSpec::_type_handle;
|
||||
|
||||
GraphicsPipe::PipeFactory GraphicsPipe::_factory;
|
||||
|
||||
// These static members are pointers rather than concrete objects so
|
||||
// we can guarantee order of creation at static init time.
|
||||
GraphicsPipe::PipeFactory *GraphicsPipe::_factory = NULL;
|
||||
GraphicsPipe::Pipes *GraphicsPipe::_all_pipes = NULL;
|
||||
|
||||
GraphicsPipe::PipeSpec::~PipeSpec(void) {}
|
||||
|
|
@ -134,7 +133,7 @@ make_window() {
|
|||
FactoryParams params;
|
||||
params.add_param(new GraphicsWindow::WindowPipe(this));
|
||||
|
||||
GraphicsWindow *win = GraphicsWindow::_factory.
|
||||
GraphicsWindow *win = GraphicsWindow::get_factory().
|
||||
make_instance(get_window_type(), params);
|
||||
nassertr(win != (GraphicsWindow *)NULL, NULL);
|
||||
|
||||
|
|
@ -157,7 +156,7 @@ make_window(const GraphicsWindow::Properties &props) {
|
|||
params.add_param(new GraphicsWindow::WindowPipe(this));
|
||||
params.add_param(new GraphicsWindow::WindowProps(props));
|
||||
|
||||
GraphicsWindow *win = GraphicsWindow::_factory.
|
||||
GraphicsWindow *win = GraphicsWindow::get_factory().
|
||||
make_instance(get_window_type(), params);
|
||||
nassertr(win != (GraphicsWindow *)NULL, NULL);
|
||||
|
||||
|
|
@ -294,7 +293,8 @@ add_window(GraphicsWindow *win) {
|
|||
}
|
||||
|
||||
void GraphicsPipe::read_priorities(void) {
|
||||
if (_factory.get_num_preferred() == 0) {
|
||||
PipeFactory &factory = get_factory();
|
||||
if (factory.get_num_preferred() == 0) {
|
||||
Config::ConfigTable::Symbol::iterator i;
|
||||
for (i = preferred_pipe_begin(); i != preferred_pipe_end(); ++i) {
|
||||
ConfigString type_name = (*i).Val();
|
||||
|
|
@ -306,12 +306,27 @@ void GraphicsPipe::read_priorities(void) {
|
|||
} else {
|
||||
display_cat.debug()
|
||||
<< "Specifying type " << type << " for pipe preference.\n";
|
||||
_factory.add_preferred(type);
|
||||
factory.add_preferred(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: GraphicsPipe::get_factory
|
||||
// Access: Public, Static
|
||||
// Description: Returns the factory object that can be used to
|
||||
// register new kinds of GraphicsPipe objects that may
|
||||
// be created.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
GraphicsPipe::PipeFactory &GraphicsPipe::
|
||||
get_factory() {
|
||||
if (_factory == (PipeFactory *)NULL) {
|
||||
_factory = new PipeFactory;
|
||||
}
|
||||
return (*_factory);
|
||||
}
|
||||
|
||||
void GraphicsPipe::resolve_modules(void) {
|
||||
Config::ConfigTable::Symbol::iterator i;
|
||||
|
||||
|
|
|
|||
|
|
@ -88,8 +88,7 @@ public:
|
|||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
static PipeFactory _factory;
|
||||
|
||||
static PipeFactory &get_factory();
|
||||
static void resolve_modules(void);
|
||||
|
||||
private:
|
||||
|
|
@ -108,7 +107,8 @@ private:
|
|||
typedef vector<GraphicsPipe *> Pipes;
|
||||
|
||||
Windows _windows;
|
||||
|
||||
|
||||
static PipeFactory *_factory;
|
||||
static Pipes *_all_pipes;
|
||||
INLINE static Pipes &get_all_pipes();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
TypeHandle GraphicsStateGuardian::_type_handle;
|
||||
TypeHandle GraphicsStateGuardian::GsgWindow::_type_handle;
|
||||
|
||||
GraphicsStateGuardian::GsgFactory GraphicsStateGuardian::_factory;
|
||||
GraphicsStateGuardian::GsgFactory *GraphicsStateGuardian::_factory = NULL;
|
||||
|
||||
GraphicsStateGuardian::GsgWindow::~GsgWindow(void) {}
|
||||
|
||||
|
|
@ -414,9 +414,25 @@ unmark_prepared_texture(TextureContext *tc) {
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: GraphicsStateGuardian::get_factory
|
||||
// Access: Public, Static
|
||||
// Description: Returns the factory object that can be used to
|
||||
// register new kinds of GraphicsStateGuardian objects that may
|
||||
// be created.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
GraphicsStateGuardian::GsgFactory &GraphicsStateGuardian::
|
||||
get_factory() {
|
||||
if (_factory == (GsgFactory *)NULL) {
|
||||
_factory = new GsgFactory;
|
||||
}
|
||||
return (*_factory);
|
||||
}
|
||||
|
||||
void GraphicsStateGuardian::read_priorities(void)
|
||||
{
|
||||
if (_factory.get_num_preferred() == 0) {
|
||||
GsgFactory &factory = get_factory();
|
||||
if (factory.get_num_preferred() == 0) {
|
||||
Config::ConfigTable::Symbol::iterator i;
|
||||
for (i = preferred_gsg_begin(); i != preferred_gsg_end(); ++i) {
|
||||
ConfigString type_name = (*i).Val();
|
||||
|
|
@ -428,7 +444,7 @@ void GraphicsStateGuardian::read_priorities(void)
|
|||
} else {
|
||||
display_cat.debug()
|
||||
<< "Specifying type " << type << " for GSG preference.\n";
|
||||
_factory.add_preferred(type);
|
||||
factory.add_preferred(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,11 +182,13 @@ public:
|
|||
INLINE GsgWindow(void) : GsgParam() {}
|
||||
};
|
||||
|
||||
static GsgFactory _factory;
|
||||
static GsgFactory &get_factory();
|
||||
|
||||
private:
|
||||
static void read_priorities(void);
|
||||
|
||||
static GsgFactory *_factory;
|
||||
|
||||
public:
|
||||
INLINE GraphicsWindow* get_window(void) const { return _win; }
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ TypeHandle GraphicsWindow::_type_handle;
|
|||
TypeHandle GraphicsWindow::WindowProps::_type_handle;
|
||||
TypeHandle GraphicsWindow::WindowPipe::_type_handle;
|
||||
|
||||
GraphicsWindow::WindowFactory GraphicsWindow::_factory;
|
||||
GraphicsWindow::WindowFactory *GraphicsWindow::_factory = NULL;
|
||||
|
||||
PStatCollector GraphicsWindow::_app_pcollector =
|
||||
PStatCollector("App", RGBColorf(0,1,1));
|
||||
|
|
@ -497,14 +497,30 @@ make_gsg() {
|
|||
FactoryParams params;
|
||||
params.add_param(new GraphicsStateGuardian::GsgWindow(this));
|
||||
|
||||
_gsg = GraphicsStateGuardian::_factory.
|
||||
_gsg = GraphicsStateGuardian::get_factory().
|
||||
make_instance(get_gsg_type(), params);
|
||||
|
||||
nassertv(_gsg != (GraphicsStateGuardian *)NULL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: GraphicsWindow::get_factory
|
||||
// Access: Public, Static
|
||||
// Description: Returns the factory object that can be used to
|
||||
// register new kinds of GraphicsWindow objects that may
|
||||
// be created.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
GraphicsWindow::WindowFactory &GraphicsWindow::
|
||||
get_factory() {
|
||||
if (_factory == (WindowFactory *)NULL) {
|
||||
_factory = new WindowFactory;
|
||||
}
|
||||
return (*_factory);
|
||||
}
|
||||
|
||||
void GraphicsWindow::read_priorities(void) {
|
||||
if (_factory.get_num_preferred() == 0) {
|
||||
WindowFactory &factory = get_factory();
|
||||
if (factory.get_num_preferred() == 0) {
|
||||
Config::ConfigTable::Symbol::iterator i;
|
||||
for (i = preferred_window_begin(); i != preferred_window_end(); ++i) {
|
||||
ConfigString type_name = (*i).Val();
|
||||
|
|
@ -516,7 +532,7 @@ void GraphicsWindow::read_priorities(void) {
|
|||
} else {
|
||||
display_cat.debug()
|
||||
<< "Specifying type " << type << " for window preference.\n";
|
||||
_factory.add_preferred(type);
|
||||
factory.add_preferred(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ protected:
|
|||
private:
|
||||
typedef vector<PT(GraphicsChannel)> Channels;
|
||||
Channels _channels;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// factory stuff
|
||||
|
|
@ -237,7 +237,7 @@ public:
|
|||
INLINE WindowPipe(void) : WindowParam() {}
|
||||
};
|
||||
|
||||
static WindowFactory _factory;
|
||||
static WindowFactory &get_factory();
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -245,6 +245,8 @@ private:
|
|||
|
||||
GraphicsWindow(const GraphicsWindow&);
|
||||
GraphicsWindow &operator=(const GraphicsWindow&);
|
||||
|
||||
static WindowFactory *_factory;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,24 @@ parse_decal_type(const string &type) {
|
|||
}
|
||||
|
||||
ConfigureFn(config_dxgsg) {
|
||||
init_libdxgsg();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libdxgsg
|
||||
// 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_libdxgsg() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
string decal_type = config_dxgsg.GetString("dx-decal-type", "");
|
||||
if (!decal_type.empty()) {
|
||||
|
|
@ -67,10 +85,7 @@ ConfigureFn(config_dxgsg) {
|
|||
DXSavedFrameBuffer::init_type();
|
||||
DXTextureContext::init_type();
|
||||
|
||||
GraphicsStateGuardian::_factory.register_factory
|
||||
GraphicsStateGuardian::get_factory().register_factory
|
||||
(DXGraphicsStateGuardian::get_class_type(),
|
||||
DXGraphicsStateGuardian::make_DXGraphicsStateGuardian);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,5 +33,6 @@ enum DXDecalType {
|
|||
};
|
||||
extern DXDecalType dx_decal_type;
|
||||
|
||||
extern EXPCL_PANDADX void init_libdxgsg();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -44,6 +44,31 @@ Configure(config_egg);
|
|||
NotifyCategoryDef(egg, "");
|
||||
|
||||
ConfigureFn(config_egg) {
|
||||
init_libegg();
|
||||
}
|
||||
|
||||
const DSearchPath &
|
||||
get_egg_path() {
|
||||
static DSearchPath *egg_path = NULL;
|
||||
return get_config_path("egg-path", egg_path);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libegg
|
||||
// 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_libegg() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
EggRenderMode::init_type();
|
||||
EggAnimData::init_type();
|
||||
EggAttributes::init_type();
|
||||
|
|
@ -79,9 +104,3 @@ ConfigureFn(config_egg) {
|
|||
EggXfmAnimData::init_type();
|
||||
EggXfmSAnim::init_type();
|
||||
}
|
||||
|
||||
const DSearchPath &
|
||||
get_egg_path() {
|
||||
static DSearchPath *egg_path = NULL;
|
||||
return get_config_path("egg-path", egg_path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@ NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG);
|
|||
|
||||
const DSearchPath &get_egg_path();
|
||||
|
||||
extern EXPCL_PANDAEGG void init_libegg();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -51,6 +51,25 @@ bool egg_keep_texture_pathnames = config_egg2sg.GetBool("egg-keep-texture-pathna
|
|||
CoordinateSystem egg_coordinate_system;
|
||||
|
||||
ConfigureFn(config_egg2sg) {
|
||||
init_libegg2sg();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libegg2sg
|
||||
// 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_libegg2sg() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
LoaderFileTypeEgg::init_type();
|
||||
|
||||
string csstr = config_egg2sg.GetString("egg-coordinate-system", "default");
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@ extern EXPCL_PANDAEGG bool egg_flatten_siblings;
|
|||
extern EXPCL_PANDAEGG bool egg_show_collision_solids;
|
||||
extern EXPCL_PANDAEGG bool egg_keep_texture_pathnames;
|
||||
|
||||
|
||||
extern EXPCL_PANDAEGG void init_libegg2sg();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#define TARGET express
|
||||
#define USE_NSPR yes
|
||||
#define USE_CRYPTO yes
|
||||
#define USE_NET yes
|
||||
|
||||
#define SOURCES \
|
||||
bigEndian.I bigEndian.cxx bigEndian.h buffer.I buffer.cxx buffer.h \
|
||||
|
|
|
|||
|
|
@ -926,10 +926,10 @@ int framework_main(int argc, char *argv[]) {
|
|||
GraphicsPipe::resolve_modules();
|
||||
|
||||
framework_cat.info() << "Known pipe types:" << endl;
|
||||
GraphicsPipe::_factory.write_types(framework_cat.info(false), 2);
|
||||
GraphicsPipe::get_factory().write_types(framework_cat.info(false), 2);
|
||||
|
||||
// Create a window
|
||||
main_pipe = GraphicsPipe::_factory.
|
||||
main_pipe = GraphicsPipe::get_factory().
|
||||
make_instance(InteractiveGraphicsPipe::get_class_type());
|
||||
|
||||
if (main_pipe == (GraphicsPipe*)0L) {
|
||||
|
|
@ -942,7 +942,7 @@ int framework_main(int argc, char *argv[]) {
|
|||
<< "Opened a '" << main_pipe->get_type().get_name()
|
||||
<< "' interactive graphics pipe." << endl;
|
||||
|
||||
rib_pipe = GraphicsPipe::_factory.
|
||||
rib_pipe = GraphicsPipe::get_factory().
|
||||
make_instance(NoninteractiveGraphicsPipe::get_class_type());
|
||||
|
||||
if (rib_pipe == (GraphicsPipe*)0L)
|
||||
|
|
|
|||
|
|
@ -54,8 +54,26 @@ parse_decal_type(const string &type) {
|
|||
return GDT_offset;
|
||||
}
|
||||
|
||||
|
||||
ConfigureFn(config_glgsg) {
|
||||
init_libglgsg();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libglgsg
|
||||
// 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_libglgsg() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
string decal_type = config_glgsg.GetString("gl-decal-type", "");
|
||||
if (!decal_type.empty()) {
|
||||
gl_decal_type = parse_decal_type(decal_type);
|
||||
|
|
@ -65,7 +83,7 @@ ConfigureFn(config_glgsg) {
|
|||
GLSavedFrameBuffer::init_type();
|
||||
GLTextureContext::init_type();
|
||||
|
||||
GraphicsStateGuardian::_factory.register_factory
|
||||
GraphicsStateGuardian::get_factory().register_factory
|
||||
(GLGraphicsStateGuardian::get_class_type(),
|
||||
GLGraphicsStateGuardian::make_GlGraphicsStateGuardian);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,6 @@ enum GLDecalType {
|
|||
};
|
||||
extern GLDecalType gl_decal_type;
|
||||
|
||||
extern EXPCL_PANDAGL void init_libglgsg();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ NotifyCategoryDef(glutdisplay, "display");
|
|||
|
||||
ConfigureFn(config_glutdisplay) {
|
||||
glutGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(glutGraphicsPipe::get_class_type(),
|
||||
GraphicsPipe::get_factory().register_factory(glutGraphicsPipe::get_class_type(),
|
||||
glutGraphicsPipe::make_glutGraphicsPipe);
|
||||
glutGraphicsWindow::init_type();
|
||||
GraphicsWindow::_factory.register_factory(glutGraphicsWindow::get_class_type(),
|
||||
GraphicsWindow::get_factory().register_factory(glutGraphicsWindow::get_class_type(),
|
||||
glutGraphicsWindow::make_GlutGraphicsWindow);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ NotifyCategoryDef(glxdisplay, "display");
|
|||
|
||||
ConfigureFn(config_glxdisplay) {
|
||||
glxGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(glxGraphicsPipe::get_class_type(),
|
||||
GraphicsPipe::get_factory().register_factory(glxGraphicsPipe::get_class_type(),
|
||||
glxGraphicsPipe::make_glxGraphicsPipe);
|
||||
glxGraphicsWindow::init_type();
|
||||
GraphicsWindow::_factory.register_factory(glxGraphicsWindow::get_class_type(),
|
||||
GraphicsWindow::get_factory().register_factory(glxGraphicsWindow::get_class_type(),
|
||||
glxGraphicsWindow::make_GlxGraphicsWindow);
|
||||
glxDisplay::init_type();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,26 +23,7 @@ NotifyCategoryDef(graph, "");
|
|||
NotifyCategoryDef(wrt, graph_cat);
|
||||
|
||||
ConfigureFn(config_graph) {
|
||||
BoundedObject::init_type();
|
||||
NamedNode::init_type();
|
||||
Node::init_type();
|
||||
NodeRelation::init_type();
|
||||
NodeTransition::init_type();
|
||||
NodeAttribute::init_type();
|
||||
OnOffTransition::init_type();
|
||||
OnOffAttribute::init_type();
|
||||
MultiNodeTransition::init_type();
|
||||
MultiNodeAttribute::init_type();
|
||||
ImmediateTransition::init_type();
|
||||
ImmediateAttribute::init_type();
|
||||
|
||||
NodeRelation::register_with_factory();
|
||||
|
||||
//Registration of writeable object's creation
|
||||
//functions with BamReader's factory
|
||||
Node::register_with_read_factory();
|
||||
NamedNode::register_with_read_factory();
|
||||
NodeRelation::register_with_read_factory();
|
||||
init_libgraph();
|
||||
}
|
||||
|
||||
// Set this true if you want to cache some of the work of computing
|
||||
|
|
@ -72,3 +53,44 @@ const bool paranoid_wrt = config_graph.GetBool("paranoid-wrt", false);
|
|||
// it cannot be turned on in NDEBUG mode.
|
||||
const bool paranoid_graph = config_graph.GetBool("paranoid-graph", false);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libgraph
|
||||
// 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_libgraph() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
void init_last_graph_update();
|
||||
init_last_graph_update();
|
||||
|
||||
BoundedObject::init_type();
|
||||
NamedNode::init_type();
|
||||
Node::init_type();
|
||||
NodeRelation::init_type();
|
||||
NodeTransition::init_type();
|
||||
NodeAttribute::init_type();
|
||||
OnOffTransition::init_type();
|
||||
OnOffAttribute::init_type();
|
||||
MultiNodeTransition::init_type();
|
||||
MultiNodeAttribute::init_type();
|
||||
ImmediateTransition::init_type();
|
||||
ImmediateAttribute::init_type();
|
||||
|
||||
NodeRelation::register_with_factory();
|
||||
|
||||
//Registration of writeable object's creation
|
||||
//functions with BamReader's factory
|
||||
Node::register_with_read_factory();
|
||||
NamedNode::register_with_read_factory();
|
||||
NodeRelation::register_with_read_factory();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,4 +18,6 @@ extern const bool EXPCL_PANDA ambiguous_wrt_abort;
|
|||
extern const bool EXPCL_PANDA paranoid_wrt;
|
||||
extern const bool EXPCL_PANDA paranoid_graph;
|
||||
|
||||
extern EXPCL_PANDA void init_libgraph();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,10 +12,39 @@
|
|||
|
||||
TypeHandle NodeRelation::_type_handle;
|
||||
|
||||
LastGraphUpdate last_graph_update;
|
||||
|
||||
Factory<NodeRelation> *NodeRelation::_factory = NULL;
|
||||
|
||||
typedef map<TypeHandle, UpdateSeq> LastGraphUpdate;
|
||||
static LastGraphUpdate *last_graph_update_map = NULL;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: last_graph_update
|
||||
// Description: Returns a modifiable reference to the sequence number
|
||||
// indicating the last update to the indicated type of
|
||||
// graph.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
UpdateSeq &
|
||||
last_graph_update(TypeHandle graph_type) {
|
||||
#ifndef NDEBUG
|
||||
static UpdateSeq initial;
|
||||
nassertr(last_graph_update_map != (LastGraphUpdate *)NULL, initial);
|
||||
#endif
|
||||
return (*last_graph_update_map)[graph_type];
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_last_graph_update
|
||||
// Description: Initializes the last_graph_update map. This call
|
||||
// must be made before last_graph_update() can be safely
|
||||
// called.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
init_last_graph_update() {
|
||||
if (last_graph_update_map == NULL) {
|
||||
last_graph_update_map = new LastGraphUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
// Following are a handful of local template functions that provide
|
||||
// support for manipulating the list of arcs on nodes. They are
|
||||
// template functions because they work as well on UpRelationArcs as
|
||||
|
|
@ -472,7 +501,7 @@ attach() {
|
|||
|
||||
// Blow out the cache and increment the current update sequence.
|
||||
_net_transitions.clear();
|
||||
_last_update = ++last_graph_update[_type];
|
||||
_last_update = ++last_graph_update(_type);
|
||||
|
||||
/*
|
||||
// If we have just added a new parent arc to a node that previously
|
||||
|
|
@ -532,7 +561,7 @@ detach() {
|
|||
|
||||
// Blow out the cache and increment the current update sequence.
|
||||
_net_transitions.clear();
|
||||
_last_update = ++last_graph_update[_type];
|
||||
_last_update = ++last_graph_update(_type);
|
||||
|
||||
/*
|
||||
// If we have just removed a parent arc from a node, leaving exactly
|
||||
|
|
@ -576,7 +605,7 @@ detach_below() {
|
|||
|
||||
// Blow out the cache and increment the current update sequence.
|
||||
_net_transitions.clear();
|
||||
_last_update = ++last_graph_update[_type];
|
||||
_last_update = ++last_graph_update(_type);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -598,7 +627,7 @@ changed_transition(TypeHandle trans_type) {
|
|||
if (_net_transitions != (NodeTransitionCache *)NULL) {
|
||||
_net_transitions->clear_transition(trans_type);
|
||||
}
|
||||
_last_update = ++last_graph_update[get_type()];
|
||||
_last_update = ++last_graph_update(get_type());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -26,12 +26,11 @@
|
|||
|
||||
class Node;
|
||||
|
||||
// This structure keeps a monotonically incrementing sequence number
|
||||
// This function keeps a monotonically incrementing sequence number
|
||||
// for each change made to the graph, for the purpose of invalidating
|
||||
// wrt cache values. A different sequence number is kept for each
|
||||
// type of graph, hence the map.
|
||||
typedef map<TypeHandle, UpdateSeq> LastGraphUpdate;
|
||||
extern LastGraphUpdate EXPCL_PANDA last_graph_update;
|
||||
// type of graph, hence the parameter.
|
||||
extern EXPCL_PANDA UpdateSeq &last_graph_update(TypeHandle graph_type);
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Class : NodeRelation
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ cached_wrt_base(const Node *from,
|
|||
TransitionWrapper &result,
|
||||
TypeHandle graph_type) {
|
||||
|
||||
UpdateSeq now = last_graph_update[graph_type];
|
||||
UpdateSeq now = last_graph_update(graph_type);
|
||||
|
||||
TransitionWrapper net_from_trans = TransitionWrapper::init_from(result);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/* See dtoolsymbols.h for a rant on the purpose of this file. */
|
||||
|
||||
#if defined(WIN32_VC) && !defined(CPPPARSER)
|
||||
#if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
|
||||
|
||||
#ifdef BUILDING_PANDA
|
||||
#define EXPCL_PANDA __declspec(dllexport)
|
||||
|
|
|
|||
|
|
@ -12,5 +12,24 @@ Configure(config_pnmimage);
|
|||
NotifyCategoryDef(pnmimage, "");
|
||||
|
||||
ConfigureFn(config_pnmimage) {
|
||||
init_libpnmimage();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libpnmimage
|
||||
// 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_libpnmimage() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
PNMFileType::init_type();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,6 @@
|
|||
|
||||
NotifyCategoryDecl(pnmimage, EXPCL_PANDA, EXPTP_PANDA);
|
||||
|
||||
extern EXPCL_PANDA void init_libpnmimage();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,5 +22,8 @@
|
|||
#define IF_JPEG_SOURCES \
|
||||
pnmFileTypeJPG.cxx pnmFileTypeJPGReader.cxx pnmFileTypeJPGWriter.cxx
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
config_pnmimagetypes.h
|
||||
|
||||
#end lib_target
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,26 @@ const int jpeg_scale_num = config_pnmimagetypes.GetInt("jpeg-scale-num", 1);
|
|||
const int jpeg_scale_denom = config_pnmimagetypes.GetInt("jpeg-scale-denom", 1);
|
||||
|
||||
ConfigureFn(config_pnmimagetypes) {
|
||||
init_libpnmimagetypes();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libpnmimagetypes
|
||||
// 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_libpnmimagetypes() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
init_libpnmimage();
|
||||
PNMFileTypePNM::init_type();
|
||||
PNMFileTypeSGI::init_type();
|
||||
PNMFileTypeAlias::init_type();
|
||||
|
|
|
|||
|
|
@ -41,4 +41,6 @@ extern IMGHeaderType img_header_type;
|
|||
extern const int img_xsize;
|
||||
extern const int img_ysize;
|
||||
|
||||
extern EXPCL_PANDA void init_libpnmimagetypes();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ NotifyCategoryDef(ribdisplay, "display");
|
|||
|
||||
ConfigureFn(config_ribdisplay) {
|
||||
RIBGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(RIBGraphicsPipe::get_class_type(),
|
||||
GraphicsPipe::get_factory().register_factory(RIBGraphicsPipe::get_class_type(),
|
||||
RIBGraphicsPipe::make_RIBGraphicsPipe);
|
||||
RIBGraphicsWindow::init_type();
|
||||
GraphicsWindow::_factory.register_factory(RIBGraphicsWindow::get_class_type(),
|
||||
GraphicsWindow::get_factory().register_factory(RIBGraphicsWindow::get_class_type(),
|
||||
RIBGraphicsWindow::make_RibGraphicsWindow);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ NotifyCategoryDef(ribgsg, ":display:gsg");
|
|||
|
||||
ConfigureFn(config_ribgsg) {
|
||||
RIBGraphicsStateGuardian::init_type();
|
||||
GraphicsStateGuardian::_factory.
|
||||
GraphicsStateGuardian::get_factory().
|
||||
register_factory(RIBGraphicsStateGuardian::get_class_type(),
|
||||
RIBGraphicsStateGuardian::make_RIBGraphicsStateGuardian);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ NotifyCategoryDef(sgiglxdisplay, "display");
|
|||
|
||||
ConfigureFn(config_sgiglxdisplay) {
|
||||
SgiGlxGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(SgiGlxGraphicsPipe::get_class_type(),
|
||||
GraphicsPipe::get_factory().register_factory(SgiGlxGraphicsPipe::get_class_type(),
|
||||
SgiGlxGraphicsPipe::make_sgiglxgraphicspipe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
renderTraverser.I renderTraverser.cxx renderTraverser.h
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
camera.I camera.h geomNode.I geomNode.h geomTransformer.I \
|
||||
camera.I camera.h config_sgraph.h \
|
||||
geomNode.I geomNode.h geomTransformer.I \
|
||||
geomTransformer.h modelNode.I modelNode.h modelRoot.I \
|
||||
modelRoot.h planeNode.I planeNode.h projectionNode.I \
|
||||
projectionNode.h renderTraverser.I renderTraverser.h
|
||||
|
|
|
|||
|
|
@ -13,11 +13,33 @@
|
|||
#include "projectionNode.h"
|
||||
|
||||
#include <dconfig.h>
|
||||
#include <config_graph.h>
|
||||
|
||||
Configure(config_sgraph);
|
||||
NotifyCategoryDef(sgraph, "");
|
||||
|
||||
ConfigureFn(config_sgraph) {
|
||||
init_libsgraph();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libsgraph
|
||||
// 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_libsgraph() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
init_libgraph();
|
||||
|
||||
RenderTraverser::init_type();
|
||||
GeomNode::init_type();
|
||||
Camera::init_type();
|
||||
|
|
|
|||
|
|
@ -11,4 +11,6 @@
|
|||
|
||||
NotifyCategoryDecl(sgraph, EXPCL_PANDA, EXPTP_PANDA);
|
||||
|
||||
extern EXPCL_PANDA void init_libsgraph();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,7 +4,17 @@
|
|||
framework putil collide loader sgmanip chan text chancfg cull \
|
||||
pnmimage pnmimagetypes event effects shader graph gobj display \
|
||||
mathutil sgattrib putil express light dgraph device tform sgraph \
|
||||
linmath pstatclient sgraphutil
|
||||
linmath pstatclient sgraphutil panda
|
||||
|
||||
#if $[LINK_ALL_STATIC]
|
||||
// If we're statically linking, we need to explicitly link with
|
||||
// at least one graphics renderer.
|
||||
#define LOCAL_LIBS pandagl pandadx $[LOCAL_LIBS]
|
||||
|
||||
// And we might like to have the egg loader available.
|
||||
#define LOCAL_LIBS pandaegg $[LOCAL_LIBS]
|
||||
#endif
|
||||
|
||||
#define UNIX_SYS_LIBS m
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,19 @@
|
|||
#include <pta_Colorf.h>
|
||||
#include <pta_float.h>
|
||||
#include <pt_Node.h>
|
||||
#include <panda.h>
|
||||
|
||||
// If we're doing a static link, we should explicitly initialize some
|
||||
// of our external libraries, or they may not get linked in.
|
||||
#ifdef LINK_ALL_STATIC
|
||||
#ifdef HAVE_GL
|
||||
#include <pandagl.h>
|
||||
#endif
|
||||
#ifdef HAVE_DX
|
||||
#include <pandadx.h>
|
||||
#endif
|
||||
#include <pandaegg.h>
|
||||
#endif
|
||||
|
||||
//From framework
|
||||
extern PT(GeomNode) geomnode;
|
||||
|
|
@ -578,6 +590,23 @@ void demo_keys(EventHandler&) {
|
|||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
// We call init_libpanda() to be paranoid. It's not supposed to be
|
||||
// necessary, but it turns out that static init isn't dependable in
|
||||
// all cases.
|
||||
init_libpanda();
|
||||
|
||||
// If we're doing a static link, we should explicitly initialize some
|
||||
// of our external libraries, or they may not get linked in.
|
||||
#ifdef LINK_ALL_STATIC
|
||||
#ifdef HAVE_GL
|
||||
init_libpandagl();
|
||||
#endif
|
||||
#ifdef HAVE_DX
|
||||
init_libpandadx();
|
||||
#endif
|
||||
init_libpandaegg();
|
||||
#endif
|
||||
|
||||
define_keys = &demo_keys;
|
||||
return framework_main(argc, argv);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
wdxGraphicsPipe.h wdxGraphicsWindow.cxx wdxGraphicsWindow.h
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
wdxGraphicsPipe.h wdxGraphicsWindow.h
|
||||
config_wdxdisplay.h wdxGraphicsPipe.h wdxGraphicsWindow.h
|
||||
|
||||
#end lib_target
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,31 @@ Configure(config_wdxdisplay);
|
|||
NotifyCategoryDef(wdxdisplay, "display");
|
||||
|
||||
ConfigureFn(config_wdxdisplay) {
|
||||
init_libwdxdisplay();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libwdxdisplay
|
||||
// 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_libwdxdisplay() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
wdxGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(
|
||||
GraphicsPipe::get_factory().register_factory(
|
||||
wdxGraphicsPipe::get_class_type(),
|
||||
wdxGraphicsPipe::make_wdxGraphicsPipe);
|
||||
wdxGraphicsWindow::init_type();
|
||||
GraphicsWindow::_factory.register_factory(
|
||||
GraphicsWindow::get_factory().register_factory(
|
||||
wdxGraphicsWindow::get_class_type(),
|
||||
wdxGraphicsWindow::make_wdxGraphicsWindow);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,6 @@
|
|||
|
||||
NotifyCategoryDecl(wdxdisplay, EXPCL_PANDADX, EXPTP_PANDADX);
|
||||
|
||||
extern EXPCL_PANDADX void init_libwdxdisplay();
|
||||
|
||||
#endif /* __CONFIG_WDXDISPLAY_H__ */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
wglGraphicsPipe.h wglGraphicsWindow.cxx wglGraphicsWindow.h
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
wglGraphicsPipe.h wglGraphicsWindow.h
|
||||
config_wgldisplay.h wglGraphicsPipe.h wglGraphicsWindow.h
|
||||
|
||||
#end lib_target
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,31 @@ Configure(config_wgldisplay);
|
|||
NotifyCategoryDef(wgldisplay, "display");
|
||||
|
||||
ConfigureFn(config_wgldisplay) {
|
||||
init_libwgldisplay();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libwgldisplay
|
||||
// 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_libwgldisplay() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
wglGraphicsPipe::init_type();
|
||||
GraphicsPipe::_factory.register_factory(
|
||||
GraphicsPipe::get_factory().register_factory(
|
||||
wglGraphicsPipe::get_class_type(),
|
||||
wglGraphicsPipe::make_wglGraphicsPipe);
|
||||
wglGraphicsWindow::init_type();
|
||||
GraphicsWindow::_factory.register_factory(
|
||||
GraphicsWindow::get_factory().register_factory(
|
||||
wglGraphicsWindow::get_class_type(),
|
||||
wglGraphicsWindow::make_wglGraphicsWindow);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,6 @@
|
|||
|
||||
NotifyCategoryDecl(wgldisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
|
||||
|
||||
extern EXPCL_PANDAGL void init_libwgldisplay();
|
||||
|
||||
#endif /* __CONFIG_WGLDISPLAY_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue