mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
55fb14b792
@ -369,8 +369,16 @@ void PSSMCameraRig::update(NodePath cam_node, const LVecBase3 &light_vector) {
|
|||||||
LMatrix4 transform = cam_node.get_transform()->get_mat();
|
LMatrix4 transform = cam_node.get_transform()->get_mat();
|
||||||
|
|
||||||
// Get Camera and Lens pointers
|
// Get Camera and Lens pointers
|
||||||
Camera* cam = DCAST(Camera, cam_node.get_child(0).node());
|
Camera *cam;
|
||||||
|
PandaNode *node = cam_node.node();
|
||||||
|
if (node->is_of_type(Camera::get_class_type())) {
|
||||||
|
cam = (Camera *)node;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Perhaps we passed in something like base.camera ?
|
||||||
|
cam = DCAST(Camera, cam_node.get_child(0).node());
|
||||||
nassertv(cam != nullptr);
|
nassertv(cam != nullptr);
|
||||||
|
}
|
||||||
Lens* lens = cam->get_lens();
|
Lens* lens = cam->get_lens();
|
||||||
|
|
||||||
// Extract near and far points:
|
// Extract near and far points:
|
||||||
|
@ -646,6 +646,7 @@ if (COMPILER == "MSVC"):
|
|||||||
else:
|
else:
|
||||||
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib")
|
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib")
|
||||||
IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/OpenEXR")
|
IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/OpenEXR")
|
||||||
|
IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/Imath")
|
||||||
if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib")
|
if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib")
|
||||||
if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/zlibstatic.lib")
|
if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/zlibstatic.lib")
|
||||||
if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/vrpn.lib")
|
if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/vrpn.lib")
|
||||||
@ -820,7 +821,7 @@ if (COMPILER=="GCC"):
|
|||||||
SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL")
|
SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL")
|
||||||
SmartPkgEnable("SQUISH", "", ("squish"), "squish.h")
|
SmartPkgEnable("SQUISH", "", ("squish"), "squish.h")
|
||||||
SmartPkgEnable("TIFF", "libtiff-4", ("tiff"), "tiff.h")
|
SmartPkgEnable("TIFF", "libtiff-4", ("tiff"), "tiff.h")
|
||||||
SmartPkgEnable("OPENEXR", "OpenEXR", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), ("OpenEXR", "OpenEXR/ImfOutputFile.h"))
|
SmartPkgEnable("OPENEXR", "OpenEXR", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), ("OpenEXR", "Imath", "OpenEXR/ImfOutputFile.h"))
|
||||||
SmartPkgEnable("VRPN", "", ("vrpn", "quat"), ("vrpn", "quat.h", "vrpn/vrpn_Types.h"))
|
SmartPkgEnable("VRPN", "", ("vrpn", "quat"), ("vrpn", "quat.h", "vrpn/vrpn_Types.h"))
|
||||||
SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h"))
|
SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h"))
|
||||||
SmartPkgEnable("VORBIS", "vorbisfile",("vorbisfile", "vorbis", "ogg"), ("ogg/ogg.h", "vorbis/vorbisfile.h"))
|
SmartPkgEnable("VORBIS", "vorbisfile",("vorbisfile", "vorbis", "ogg"), ("ogg/ogg.h", "vorbis/vorbisfile.h"))
|
||||||
|
@ -10013,7 +10013,8 @@ get_internal_image_format(Texture *tex, bool force_sized) const {
|
|||||||
bool is_3d = (texture_type == Texture::TT_3d_texture ||
|
bool is_3d = (texture_type == Texture::TT_3d_texture ||
|
||||||
texture_type == Texture::TT_2d_texture_array);
|
texture_type == Texture::TT_2d_texture_array);
|
||||||
|
|
||||||
if (get_supports_compressed_texture_format(compression)) {
|
if (get_supports_compressed_texture_format(compression) &&
|
||||||
|
texture_type != Texture::TT_buffer_texture) {
|
||||||
switch (compression) {
|
switch (compression) {
|
||||||
case Texture::CM_on:
|
case Texture::CM_on:
|
||||||
// The user asked for just generic compression. OpenGL supports
|
// The user asked for just generic compression. OpenGL supports
|
||||||
@ -13080,7 +13081,9 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) {
|
|||||||
image_compression = tex->get_ram_image_compression();
|
image_compression = tex->get_ram_image_compression();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_supports_compressed_texture_format(image_compression)) {
|
bool is_buffer_texture = tex->get_texture_type() == Texture::TT_buffer_texture;
|
||||||
|
if (is_buffer_texture ||
|
||||||
|
!get_supports_compressed_texture_format(image_compression)) {
|
||||||
image = tex->get_uncompressed_ram_image();
|
image = tex->get_uncompressed_ram_image();
|
||||||
image_compression = Texture::CM_off;
|
image_compression = Texture::CM_off;
|
||||||
|
|
||||||
@ -13098,7 +13101,7 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) {
|
|||||||
// If we'll use immutable texture storage, we have to pick a sized image
|
// If we'll use immutable texture storage, we have to pick a sized image
|
||||||
// format.
|
// format.
|
||||||
bool force_sized = (gl_immutable_texture_storage && _supports_tex_storage) ||
|
bool force_sized = (gl_immutable_texture_storage && _supports_tex_storage) ||
|
||||||
(tex->get_texture_type() == Texture::TT_buffer_texture);
|
(is_buffer_texture);
|
||||||
|
|
||||||
GLint internal_format = get_internal_image_format(tex, force_sized);
|
GLint internal_format = get_internal_image_format(tex, force_sized);
|
||||||
GLint external_format = get_external_image_format(tex);
|
GLint external_format = get_external_image_format(tex);
|
||||||
|
@ -805,6 +805,11 @@ make_lines_in_place() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cdata->_primitive_type == PT_polygons ||
|
||||||
|
cdata->_primitive_type == PT_patches) {
|
||||||
|
cdata->_primitive_type = PT_lines;
|
||||||
|
}
|
||||||
|
|
||||||
cdata->_modified = Geom::get_next_modified();
|
cdata->_modified = Geom::get_next_modified();
|
||||||
reset_geom_rendering(cdata);
|
reset_geom_rendering(cdata);
|
||||||
clear_cache_stage(current_thread);
|
clear_cache_stage(current_thread);
|
||||||
@ -842,6 +847,10 @@ make_points_in_place() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cdata->_primitive_type != PT_none) {
|
||||||
|
cdata->_primitive_type = PT_points;
|
||||||
|
}
|
||||||
|
|
||||||
cdata->_modified = Geom::get_next_modified();
|
cdata->_modified = Geom::get_next_modified();
|
||||||
reset_geom_rendering(cdata);
|
reset_geom_rendering(cdata);
|
||||||
clear_cache_stage(current_thread);
|
clear_cache_stage(current_thread);
|
||||||
@ -879,6 +888,10 @@ make_patches_in_place() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cdata->_primitive_type != PT_none) {
|
||||||
|
cdata->_primitive_type = PT_patches;
|
||||||
|
}
|
||||||
|
|
||||||
cdata->_modified = Geom::get_next_modified();
|
cdata->_modified = Geom::get_next_modified();
|
||||||
reset_geom_rendering(cdata);
|
reset_geom_rendering(cdata);
|
||||||
clear_cache_stage(current_thread);
|
clear_cache_stage(current_thread);
|
||||||
|
@ -5866,8 +5866,13 @@ do_consider_auto_process_ram_image(CData *cdata, bool generate_mipmaps,
|
|||||||
if (allow_compression && !driver_compress_textures) {
|
if (allow_compression && !driver_compress_textures) {
|
||||||
CompressionMode compression = cdata->_compression;
|
CompressionMode compression = cdata->_compression;
|
||||||
if (compression == CM_default && compressed_textures) {
|
if (compression == CM_default && compressed_textures) {
|
||||||
|
if (cdata->_texture_type == Texture::TT_buffer_texture) {
|
||||||
|
compression = CM_off;
|
||||||
|
}
|
||||||
|
else {
|
||||||
compression = CM_on;
|
compression = CM_on;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (compression != CM_off && cdata->_ram_image_compression == CM_off) {
|
if (compression != CM_off && cdata->_ram_image_compression == CM_off) {
|
||||||
GraphicsStateGuardianBase *gsg = GraphicsStateGuardianBase::get_default_gsg();
|
GraphicsStateGuardianBase *gsg = GraphicsStateGuardianBase::get_default_gsg();
|
||||||
if (do_compress_ram_image(cdata, compression, QL_default, gsg)) {
|
if (do_compress_ram_image(cdata, compression, QL_default, gsg)) {
|
||||||
@ -7249,7 +7254,11 @@ do_set_quality_level(CData *cdata, Texture::QualityLevel quality_level) {
|
|||||||
bool Texture::
|
bool Texture::
|
||||||
do_has_compression(const CData *cdata) const {
|
do_has_compression(const CData *cdata) const {
|
||||||
if (cdata->_compression == CM_default) {
|
if (cdata->_compression == CM_default) {
|
||||||
|
if (cdata->_texture_type != Texture::TT_buffer_texture) {
|
||||||
return compressed_textures;
|
return compressed_textures;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return (cdata->_compression != CM_off);
|
return (cdata->_compression != CM_off);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
#include <ImfChannelList.h>
|
#include <ImfChannelList.h>
|
||||||
#include <ImfVersion.h>
|
#include <ImfVersion.h>
|
||||||
#include <ImfIO.h>
|
#include <ImfIO.h>
|
||||||
|
#include <ImfFrameBuffer.h>
|
||||||
|
#include <ImfHeader.h>
|
||||||
|
|
||||||
|
#include <ImathBox.h>
|
||||||
|
|
||||||
#ifndef IMATH_NAMESPACE
|
#ifndef IMATH_NAMESPACE
|
||||||
#define IMATH_NAMESPACE Imath
|
#define IMATH_NAMESPACE Imath
|
||||||
@ -50,6 +54,15 @@ public:
|
|||||||
_strm.write(c, n);
|
_strm.write(c, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OPENEXR_VERSION_MAJOR >= 3
|
||||||
|
virtual uint64_t tellp() {
|
||||||
|
return _strm.tellp();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void seekp(uint64_t pos) {
|
||||||
|
_strm.seekp(pos);
|
||||||
|
}
|
||||||
|
#else
|
||||||
virtual IMF::Int64 tellp() {
|
virtual IMF::Int64 tellp() {
|
||||||
return _strm.tellp();
|
return _strm.tellp();
|
||||||
}
|
}
|
||||||
@ -57,6 +70,7 @@ public:
|
|||||||
virtual void seekp(IMF::Int64 pos) {
|
virtual void seekp(IMF::Int64 pos) {
|
||||||
_strm.seekp(pos);
|
_strm.seekp(pos);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::ostream &_strm;
|
std::ostream &_strm;
|
||||||
@ -88,6 +102,15 @@ public:
|
|||||||
return not_eof;
|
return not_eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OPENEXR_VERSION_MAJOR >= 3
|
||||||
|
virtual uint64_t tellg() {
|
||||||
|
return _strm.tellg();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void seekg(uint64_t pos) {
|
||||||
|
_strm.seekg(pos);
|
||||||
|
}
|
||||||
|
#else
|
||||||
virtual IMF::Int64 tellg() {
|
virtual IMF::Int64 tellg() {
|
||||||
return _strm.tellg();
|
return _strm.tellg();
|
||||||
}
|
}
|
||||||
@ -95,6 +118,7 @@ public:
|
|||||||
virtual void seekg(IMF::Int64 pos) {
|
virtual void seekg(IMF::Int64 pos) {
|
||||||
_strm.seekg(pos);
|
_strm.seekg(pos);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual void clear() {
|
virtual void clear() {
|
||||||
_strm.clear();
|
_strm.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user