00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00042
00043
00044
00045
00046
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 }