Panda3D

config_distort.cxx

00001 // Filename: config_distort.cxx
00002 // Created by:  drose (11Dec01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "config_distort.h"
00016 #include "cylindricalLens.h"
00017 #include "fisheyeLens.h"
00018 #include "pSphereLens.h"
00019 #include "oSphereLens.h"
00020 #include "projectionScreen.h"
00021 
00022 #include "dconfig.h"
00023 
00024 Configure(config_distort);
00025 NotifyCategoryDef(distort, "");
00026 
00027 ConfigureFn(config_distort) {
00028   init_libdistort();
00029 }
00030 
00031 ConfigVariableBool project_invert_uvs
00032 ("project-invert-uvs", false,
00033  PRC_DESC("If this is true, the UV's generated by all ProjectionScreens are "
00034           "inverted top-to-bottom.  This used to be required to compensate "
00035           "for buggy graphics drivers that rendered to a texture upside-down "
00036           "in this manner, but nowadays Panda should be able to autodetect "
00037           "these graphics drivers.  If it fails to do this, you should "
00038           "probably set copy-texture-inverted instead, which is more general."));
00039 
00040 ////////////////////////////////////////////////////////////////////
00041 //     Function: init_libdistort
00042 //  Description: Initializes the library.  This must be called at
00043 //               least once before any of the functions or classes in
00044 //               this library can be used.  Normally it will be
00045 //               called by the static initializers and need not be
00046 //               called explicitly, but special cases exist.
00047 ////////////////////////////////////////////////////////////////////
00048 void
00049 init_libdistort() {
00050   static bool initialized = false;
00051   if (initialized) {
00052     return;
00053   }
00054   initialized = true;
00055 
00056   CylindricalLens::init_type();
00057   FisheyeLens::init_type();
00058   PSphereLens::init_type();
00059   OSphereLens::init_type();
00060   ProjectionScreen::init_type();
00061 }
 All Classes Functions Variables Enumerations