mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
*** empty log message ***
This commit is contained in:
parent
45c89f4ea6
commit
9bc87afb04
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -190,6 +190,18 @@ get_clear_depth() const {
|
|||||||
return _clear_depth;
|
return _clear_depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: DrawableRegion::disable_clears
|
||||||
|
// Access: Published
|
||||||
|
// Description: Disables both the color and depth clear. See
|
||||||
|
// set_clear_color_active and set_clear_depth_active.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void DrawableRegion::
|
||||||
|
disable_clears() {
|
||||||
|
set_clear_color_active(false);
|
||||||
|
set_clear_depth_active(false);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DrawableRegion::is_any_clear_active
|
// Function: DrawableRegion::is_any_clear_active
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -55,6 +55,8 @@ PUBLISHED:
|
|||||||
INLINE void set_clear_depth(float depth);
|
INLINE void set_clear_depth(float depth);
|
||||||
INLINE float get_clear_depth() const;
|
INLINE float get_clear_depth() const;
|
||||||
|
|
||||||
|
INLINE void disable_clears();
|
||||||
|
|
||||||
INLINE bool is_any_clear_active() const;
|
INLINE bool is_any_clear_active() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -232,8 +232,10 @@ apply_texture(int i, TextureContext *tc) {
|
|||||||
_d3d_device->SetTextureStageState(i, D3DTSS_MAGFILTER, new_mag_filter);
|
_d3d_device->SetTextureStageState(i, D3DTSS_MAGFILTER, new_mag_filter);
|
||||||
|
|
||||||
// map Panda composite min+mip filter types to d3d's separate min & mip filter types
|
// map Panda composite min+mip filter types to d3d's separate min & mip filter types
|
||||||
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_type(tex->get_minfilter());
|
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_type(tex->get_minfilter(),
|
||||||
D3DTEXTUREFILTERTYPE new_mip_filter = get_d3d_mip_type(tex->get_minfilter());
|
tex->get_format());
|
||||||
|
D3DTEXTUREFILTERTYPE new_mip_filter = get_d3d_mip_type(tex->get_minfilter(),
|
||||||
|
tex->get_format());
|
||||||
|
|
||||||
if (!tex->might_have_ram_image()) {
|
if (!tex->might_have_ram_image()) {
|
||||||
// If the texture is completely dynamic, don't try to issue
|
// If the texture is completely dynamic, don't try to issue
|
||||||
@ -3594,7 +3596,8 @@ copy_pres_reset(DXScreenData *screen) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
|
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
|
||||||
get_d3d_min_type(Texture::FilterType filter_type) {
|
get_d3d_min_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format) {
|
||||||
switch (filter_type) {
|
switch (filter_type) {
|
||||||
case Texture::FT_nearest:
|
case Texture::FT_nearest:
|
||||||
return D3DTEXF_POINT;
|
return D3DTEXF_POINT;
|
||||||
@ -3613,6 +3616,10 @@ get_d3d_min_type(Texture::FilterType filter_type) {
|
|||||||
|
|
||||||
case Texture::FT_linear_mipmap_linear:
|
case Texture::FT_linear_mipmap_linear:
|
||||||
return D3DTEXF_LINEAR;
|
return D3DTEXF_LINEAR;
|
||||||
|
|
||||||
|
case Texture::FT_shadow:
|
||||||
|
case Texture::FT_default:
|
||||||
|
return D3DTEXF_LINEAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
dxgsg8_cat.error()
|
dxgsg8_cat.error()
|
||||||
@ -3626,7 +3633,8 @@ get_d3d_min_type(Texture::FilterType filter_type) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
|
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
|
||||||
get_d3d_mip_type(Texture::FilterType filter_type) {
|
get_d3d_mip_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format) {
|
||||||
switch (filter_type) {
|
switch (filter_type) {
|
||||||
case Texture::FT_nearest:
|
case Texture::FT_nearest:
|
||||||
return D3DTEXF_NONE;
|
return D3DTEXF_NONE;
|
||||||
@ -3645,6 +3653,10 @@ get_d3d_mip_type(Texture::FilterType filter_type) {
|
|||||||
|
|
||||||
case Texture::FT_linear_mipmap_linear:
|
case Texture::FT_linear_mipmap_linear:
|
||||||
return D3DTEXF_LINEAR;
|
return D3DTEXF_LINEAR;
|
||||||
|
|
||||||
|
case Texture::FT_shadow:
|
||||||
|
case Texture::FT_default:
|
||||||
|
return D3DTEXF_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
dxgsg8_cat.error()
|
dxgsg8_cat.error()
|
||||||
|
@ -166,8 +166,10 @@ protected:
|
|||||||
bool release_swap_chain (DXScreenData *new_context);
|
bool release_swap_chain (DXScreenData *new_context);
|
||||||
void copy_pres_reset(DXScreenData *new_context);
|
void copy_pres_reset(DXScreenData *new_context);
|
||||||
|
|
||||||
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type);
|
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type,
|
||||||
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type);
|
Texture::Format format);
|
||||||
|
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format);
|
||||||
static D3DTEXTUREOP get_texture_operation(TextureStage::CombineMode mode, int scale);
|
static D3DTEXTUREOP get_texture_operation(TextureStage::CombineMode mode, int scale);
|
||||||
static DWORD get_texture_argument(TextureStage::CombineSource source,
|
static DWORD get_texture_argument(TextureStage::CombineSource source,
|
||||||
TextureStage::CombineOperand operand);
|
TextureStage::CombineOperand operand);
|
||||||
|
@ -296,8 +296,10 @@ apply_texture(int i, TextureContext *tc) {
|
|||||||
set_sampler_state(i, D3DSAMP_MAGFILTER, new_mag_filter);
|
set_sampler_state(i, D3DSAMP_MAGFILTER, new_mag_filter);
|
||||||
|
|
||||||
// map Panda composite min+mip filter types to d3d's separate min & mip filter types
|
// map Panda composite min+mip filter types to d3d's separate min & mip filter types
|
||||||
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_type(tex->get_minfilter());
|
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_type(tex->get_minfilter(),
|
||||||
D3DTEXTUREFILTERTYPE new_mip_filter = get_d3d_mip_type(tex->get_minfilter());
|
tex->get_format());
|
||||||
|
D3DTEXTUREFILTERTYPE new_mip_filter = get_d3d_mip_type(tex->get_minfilter(),
|
||||||
|
tex->get_format());
|
||||||
|
|
||||||
if (!tex->might_have_ram_image()) {
|
if (!tex->might_have_ram_image()) {
|
||||||
// If the texture is completely dynamic, don't try to issue
|
// If the texture is completely dynamic, don't try to issue
|
||||||
@ -4663,7 +4665,8 @@ copy_pres_reset(DXScreenData *screen) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
|
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
|
||||||
get_d3d_min_type(Texture::FilterType filter_type) {
|
get_d3d_min_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format) {
|
||||||
switch (filter_type) {
|
switch (filter_type) {
|
||||||
case Texture::FT_nearest:
|
case Texture::FT_nearest:
|
||||||
return D3DTEXF_POINT;
|
return D3DTEXF_POINT;
|
||||||
@ -4682,6 +4685,10 @@ get_d3d_min_type(Texture::FilterType filter_type) {
|
|||||||
|
|
||||||
case Texture::FT_linear_mipmap_linear:
|
case Texture::FT_linear_mipmap_linear:
|
||||||
return D3DTEXF_LINEAR;
|
return D3DTEXF_LINEAR;
|
||||||
|
|
||||||
|
case Texture::FT_shadow:
|
||||||
|
case Texture::FT_default:
|
||||||
|
return D3DTEXF_LINEAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
dxgsg9_cat.error()
|
dxgsg9_cat.error()
|
||||||
@ -4695,7 +4702,8 @@ get_d3d_min_type(Texture::FilterType filter_type) {
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
|
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
|
||||||
get_d3d_mip_type(Texture::FilterType filter_type) {
|
get_d3d_mip_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format) {
|
||||||
switch (filter_type) {
|
switch (filter_type) {
|
||||||
case Texture::FT_nearest:
|
case Texture::FT_nearest:
|
||||||
return D3DTEXF_NONE;
|
return D3DTEXF_NONE;
|
||||||
@ -4714,6 +4722,10 @@ get_d3d_mip_type(Texture::FilterType filter_type) {
|
|||||||
|
|
||||||
case Texture::FT_linear_mipmap_linear:
|
case Texture::FT_linear_mipmap_linear:
|
||||||
return D3DTEXF_LINEAR;
|
return D3DTEXF_LINEAR;
|
||||||
|
|
||||||
|
case Texture::FT_shadow:
|
||||||
|
case Texture::FT_default:
|
||||||
|
return D3DTEXF_LINEAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
dxgsg9_cat.error()
|
dxgsg9_cat.error()
|
||||||
|
@ -217,8 +217,10 @@ protected:
|
|||||||
bool release_swap_chain (DXScreenData *new_context);
|
bool release_swap_chain (DXScreenData *new_context);
|
||||||
void copy_pres_reset(DXScreenData *new_context);
|
void copy_pres_reset(DXScreenData *new_context);
|
||||||
|
|
||||||
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type);
|
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type,
|
||||||
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type);
|
Texture::Format format);
|
||||||
|
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type,
|
||||||
|
Texture::Format format);
|
||||||
static D3DTEXTUREOP get_texture_operation(TextureStage::CombineMode mode, int scale);
|
static D3DTEXTUREOP get_texture_operation(TextureStage::CombineMode mode, int scale);
|
||||||
DWORD get_texture_argument(TextureStage::CombineSource source,
|
DWORD get_texture_argument(TextureStage::CombineSource source,
|
||||||
TextureStage::CombineOperand operand) const;
|
TextureStage::CombineOperand operand) const;
|
||||||
|
@ -2171,7 +2171,6 @@ make_vertex_data(const EggRenderState *render_state,
|
|||||||
PT(VertexTransform) vt = character_maker->egg_to_transform(primitive_home);
|
PT(VertexTransform) vt = character_maker->egg_to_transform(primitive_home);
|
||||||
nassertr(vt != (VertexTransform *)NULL, vertex_data);
|
nassertr(vt != (VertexTransform *)NULL, vertex_data);
|
||||||
blend.add_transform(vt, 1.0f);
|
blend.add_transform(vt, 1.0f);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If the vertex does have an explicit membership, ignore its
|
// If the vertex does have an explicit membership, ignore its
|
||||||
// parentage and assign it where it wants to be.
|
// parentage and assign it where it wants to be.
|
||||||
|
@ -451,8 +451,10 @@ close_buffer() {
|
|||||||
_rb_size_y = 0;
|
_rb_size_y = 0;
|
||||||
|
|
||||||
// Delete the FBO itself.
|
// Delete the FBO itself.
|
||||||
nassertv(_fbo != 0);
|
if (_fbo != 0) {
|
||||||
glgsg->_glDeleteFramebuffers(1, &_fbo);
|
glgsg->_glDeleteFramebuffers(1, &_fbo);
|
||||||
|
_fbo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Release the Gsg
|
// Release the Gsg
|
||||||
_gsg.clear();
|
_gsg.clear();
|
||||||
|
@ -4493,7 +4493,8 @@ get_panda_wrap_mode(GLenum wm) {
|
|||||||
// to GL's.
|
// to GL's.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
GLenum CLP(GraphicsStateGuardian)::
|
GLenum CLP(GraphicsStateGuardian)::
|
||||||
get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) {
|
get_texture_filter_type(Texture::FilterType ft, Texture::Format fmt,
|
||||||
|
bool ignore_mipmaps) {
|
||||||
if (CLP(ignore_filters)) {
|
if (CLP(ignore_filters)) {
|
||||||
return GL_NEAREST;
|
return GL_NEAREST;
|
||||||
|
|
||||||
@ -4509,6 +4510,13 @@ get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) {
|
|||||||
return GL_LINEAR;
|
return GL_LINEAR;
|
||||||
case Texture::FT_shadow:
|
case Texture::FT_shadow:
|
||||||
return GL_LINEAR;
|
return GL_LINEAR;
|
||||||
|
case Texture::FT_default:
|
||||||
|
if ((fmt == Texture::F_depth_component)||
|
||||||
|
(fmt == Texture::F_stencil_index)) {
|
||||||
|
return GL_NEAREST;
|
||||||
|
} else {
|
||||||
|
return GL_LINEAR;
|
||||||
|
}
|
||||||
case Texture::FT_invalid:
|
case Texture::FT_invalid:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4529,6 +4537,13 @@ get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) {
|
|||||||
return GL_LINEAR_MIPMAP_LINEAR;
|
return GL_LINEAR_MIPMAP_LINEAR;
|
||||||
case Texture::FT_shadow:
|
case Texture::FT_shadow:
|
||||||
return GL_LINEAR;
|
return GL_LINEAR;
|
||||||
|
case Texture::FT_default:
|
||||||
|
if ((fmt == Texture::F_depth_component)||
|
||||||
|
(fmt == Texture::F_stencil_index)) {
|
||||||
|
return GL_NEAREST;
|
||||||
|
} else {
|
||||||
|
return GL_LINEAR;
|
||||||
|
}
|
||||||
case Texture::FT_invalid:
|
case Texture::FT_invalid:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -6243,9 +6258,9 @@ specify_texture(Texture *tex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GLP(TexParameteri)(target, GL_TEXTURE_MIN_FILTER,
|
GLP(TexParameteri)(target, GL_TEXTURE_MIN_FILTER,
|
||||||
get_texture_filter_type(minfilter, !uses_mipmaps));
|
get_texture_filter_type(minfilter, tex->get_format(), !uses_mipmaps));
|
||||||
GLP(TexParameteri)(target, GL_TEXTURE_MAG_FILTER,
|
GLP(TexParameteri)(target, GL_TEXTURE_MAG_FILTER,
|
||||||
get_texture_filter_type(magfilter, true));
|
get_texture_filter_type(magfilter, tex->get_format(), true));
|
||||||
|
|
||||||
if (tex->get_format() == Texture::F_depth_component) {
|
if (tex->get_format() == Texture::F_depth_component) {
|
||||||
GLP(TexParameteri)(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY);
|
GLP(TexParameteri)(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY);
|
||||||
|
@ -249,7 +249,8 @@ protected:
|
|||||||
GLenum get_texture_target(Texture::TextureType texture_type) const;
|
GLenum get_texture_target(Texture::TextureType texture_type) const;
|
||||||
GLenum get_texture_wrap_mode(Texture::WrapMode wm) const;
|
GLenum get_texture_wrap_mode(Texture::WrapMode wm) const;
|
||||||
static Texture::WrapMode get_panda_wrap_mode(GLenum wm);
|
static Texture::WrapMode get_panda_wrap_mode(GLenum wm);
|
||||||
static GLenum get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps);
|
static GLenum get_texture_filter_type(Texture::FilterType ft,
|
||||||
|
Texture::Format fmt, bool ignore_mipmaps);
|
||||||
static Texture::FilterType get_panda_filter_type(GLenum ft);
|
static Texture::FilterType get_panda_filter_type(GLenum ft);
|
||||||
static GLenum get_component_type(Texture::ComponentType component_type);
|
static GLenum get_component_type(Texture::ComponentType component_type);
|
||||||
GLint get_external_image_format(Texture *tex) const;
|
GLint get_external_image_format(Texture *tex) const;
|
||||||
|
@ -55,8 +55,8 @@ Texture(const string &name) :
|
|||||||
{
|
{
|
||||||
_primary_file_num_channels = 0;
|
_primary_file_num_channels = 0;
|
||||||
_alpha_file_channel = 0;
|
_alpha_file_channel = 0;
|
||||||
_magfilter = FT_linear;
|
_magfilter = FT_default;
|
||||||
_minfilter = FT_linear;
|
_minfilter = FT_default;
|
||||||
_wrap_u = WM_repeat;
|
_wrap_u = WM_repeat;
|
||||||
_wrap_v = WM_repeat;
|
_wrap_v = WM_repeat;
|
||||||
_wrap_w = WM_repeat;
|
_wrap_w = WM_repeat;
|
||||||
@ -1639,6 +1639,8 @@ string_filter_type(const string &string) {
|
|||||||
return FT_linear_mipmap_linear;
|
return FT_linear_mipmap_linear;
|
||||||
} else if (cmp_nocase_uh(string, "shadow") == 0) {
|
} else if (cmp_nocase_uh(string, "shadow") == 0) {
|
||||||
return FT_shadow;
|
return FT_shadow;
|
||||||
|
} else if (cmp_nocase_uh(string, "default") == 0) {
|
||||||
|
return FT_default;
|
||||||
} else {
|
} else {
|
||||||
return FT_invalid;
|
return FT_invalid;
|
||||||
}
|
}
|
||||||
@ -3394,6 +3396,9 @@ operator << (ostream &out, Texture::FilterType ft) {
|
|||||||
case Texture::FT_shadow:
|
case Texture::FT_shadow:
|
||||||
return out << "shadow";
|
return out << "shadow";
|
||||||
|
|
||||||
|
case Texture::FT_default:
|
||||||
|
return out << "default";
|
||||||
|
|
||||||
case Texture::FT_invalid:
|
case Texture::FT_invalid:
|
||||||
return out << "invalid";
|
return out << "invalid";
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ PUBLISHED:
|
|||||||
|
|
||||||
// The OpenGL ARB_shadow extension can be thought of as a kind of filtering.
|
// The OpenGL ARB_shadow extension can be thought of as a kind of filtering.
|
||||||
FT_shadow,
|
FT_shadow,
|
||||||
|
|
||||||
|
// Default is usually linear, but it depends on format.
|
||||||
|
// This was added at the end of the list to avoid bumping TXO version #.
|
||||||
|
FT_default,
|
||||||
|
|
||||||
// Returned by string_filter_type() for an invalid match.
|
// Returned by string_filter_type() for an invalid match.
|
||||||
FT_invalid
|
FT_invalid
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
#include "pvector.h"
|
#include "pvector.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#ifndef CPPPARSER
|
//#ifndef CPPPARSER
|
||||||
#include "../collide/collisionSolid.h"
|
//#include "../collide/collisionSolid.h"
|
||||||
#include "../collide/collisionNode.h"
|
//#include "../collide/collisionNode.h"
|
||||||
#endif
|
//#endif
|
||||||
*/
|
*/
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : PortalNode
|
// Class : PortalNode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user