*** empty log message ***

This commit is contained in:
Josh Yelon
2006-04-07 20:45:07 +00:00
parent 45c89f4ea6
commit 9bc87afb04
15 changed files with 553 additions and 474 deletions
+460 -449
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+12
View File
@@ -190,6 +190,18 @@ get_clear_depth() const {
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
// Access: Published
+2
View File
@@ -55,6 +55,8 @@ PUBLISHED:
INLINE void set_clear_depth(float depth);
INLINE float get_clear_depth() const;
INLINE void disable_clears();
INLINE bool is_any_clear_active() const;
public:
+16 -4
View File
@@ -232,8 +232,10 @@ apply_texture(int i, TextureContext *tc) {
_d3d_device->SetTextureStageState(i, D3DTSS_MAGFILTER, new_mag_filter);
// 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_mip_filter = get_d3d_mip_type(tex->get_minfilter());
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_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 the texture is completely dynamic, don't try to issue
@@ -3594,7 +3596,8 @@ copy_pres_reset(DXScreenData *screen) {
// Description:
////////////////////////////////////////////////////////////////////
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
get_d3d_min_type(Texture::FilterType filter_type) {
get_d3d_min_type(Texture::FilterType filter_type,
Texture::Format format) {
switch (filter_type) {
case Texture::FT_nearest:
return D3DTEXF_POINT;
@@ -3613,6 +3616,10 @@ get_d3d_min_type(Texture::FilterType filter_type) {
case Texture::FT_linear_mipmap_linear:
return D3DTEXF_LINEAR;
case Texture::FT_shadow:
case Texture::FT_default:
return D3DTEXF_LINEAR;
}
dxgsg8_cat.error()
@@ -3626,7 +3633,8 @@ get_d3d_min_type(Texture::FilterType filter_type) {
// Description:
////////////////////////////////////////////////////////////////////
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian8::
get_d3d_mip_type(Texture::FilterType filter_type) {
get_d3d_mip_type(Texture::FilterType filter_type,
Texture::Format format) {
switch (filter_type) {
case Texture::FT_nearest:
return D3DTEXF_NONE;
@@ -3645,6 +3653,10 @@ get_d3d_mip_type(Texture::FilterType filter_type) {
case Texture::FT_linear_mipmap_linear:
return D3DTEXF_LINEAR;
case Texture::FT_shadow:
case Texture::FT_default:
return D3DTEXF_NONE;
}
dxgsg8_cat.error()
+4 -2
View File
@@ -166,8 +166,10 @@ protected:
bool release_swap_chain (DXScreenData *new_context);
void copy_pres_reset(DXScreenData *new_context);
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type);
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type);
static D3DTEXTUREFILTERTYPE get_d3d_min_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 DWORD get_texture_argument(TextureStage::CombineSource source,
TextureStage::CombineOperand operand);
+16 -4
View File
@@ -296,8 +296,10 @@ apply_texture(int i, TextureContext *tc) {
set_sampler_state(i, D3DSAMP_MAGFILTER, new_mag_filter);
// 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_mip_filter = get_d3d_mip_type(tex->get_minfilter());
D3DTEXTUREFILTERTYPE new_min_filter = get_d3d_min_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 the texture is completely dynamic, don't try to issue
@@ -4663,7 +4665,8 @@ copy_pres_reset(DXScreenData *screen) {
// Description:
////////////////////////////////////////////////////////////////////
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
get_d3d_min_type(Texture::FilterType filter_type) {
get_d3d_min_type(Texture::FilterType filter_type,
Texture::Format format) {
switch (filter_type) {
case Texture::FT_nearest:
return D3DTEXF_POINT;
@@ -4682,6 +4685,10 @@ get_d3d_min_type(Texture::FilterType filter_type) {
case Texture::FT_linear_mipmap_linear:
return D3DTEXF_LINEAR;
case Texture::FT_shadow:
case Texture::FT_default:
return D3DTEXF_LINEAR;
}
dxgsg9_cat.error()
@@ -4695,7 +4702,8 @@ get_d3d_min_type(Texture::FilterType filter_type) {
// Description:
////////////////////////////////////////////////////////////////////
D3DTEXTUREFILTERTYPE DXGraphicsStateGuardian9::
get_d3d_mip_type(Texture::FilterType filter_type) {
get_d3d_mip_type(Texture::FilterType filter_type,
Texture::Format format) {
switch (filter_type) {
case Texture::FT_nearest:
return D3DTEXF_NONE;
@@ -4714,6 +4722,10 @@ get_d3d_mip_type(Texture::FilterType filter_type) {
case Texture::FT_linear_mipmap_linear:
return D3DTEXF_LINEAR;
case Texture::FT_shadow:
case Texture::FT_default:
return D3DTEXF_LINEAR;
}
dxgsg9_cat.error()
+4 -2
View File
@@ -217,8 +217,10 @@ protected:
bool release_swap_chain (DXScreenData *new_context);
void copy_pres_reset(DXScreenData *new_context);
static D3DTEXTUREFILTERTYPE get_d3d_min_type(Texture::FilterType filter_type);
static D3DTEXTUREFILTERTYPE get_d3d_mip_type(Texture::FilterType filter_type);
static D3DTEXTUREFILTERTYPE get_d3d_min_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);
DWORD get_texture_argument(TextureStage::CombineSource source,
TextureStage::CombineOperand operand) const;
-1
View File
@@ -2171,7 +2171,6 @@ make_vertex_data(const EggRenderState *render_state,
PT(VertexTransform) vt = character_maker->egg_to_transform(primitive_home);
nassertr(vt != (VertexTransform *)NULL, vertex_data);
blend.add_transform(vt, 1.0f);
} else {
// If the vertex does have an explicit membership, ignore its
// parentage and assign it where it wants to be.
+4 -2
View File
@@ -451,8 +451,10 @@ close_buffer() {
_rb_size_y = 0;
// Delete the FBO itself.
nassertv(_fbo != 0);
glgsg->_glDeleteFramebuffers(1, &_fbo);
if (_fbo != 0) {
glgsg->_glDeleteFramebuffers(1, &_fbo);
_fbo = 0;
}
// Release the Gsg
_gsg.clear();
@@ -4493,7 +4493,8 @@ get_panda_wrap_mode(GLenum wm) {
// to GL's.
////////////////////////////////////////////////////////////////////
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)) {
return GL_NEAREST;
@@ -4509,6 +4510,13 @@ get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) {
return GL_LINEAR;
case Texture::FT_shadow:
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:
break;
}
@@ -4529,6 +4537,13 @@ get_texture_filter_type(Texture::FilterType ft, bool ignore_mipmaps) {
return GL_LINEAR_MIPMAP_LINEAR;
case Texture::FT_shadow:
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:
break;
}
@@ -6243,9 +6258,9 @@ specify_texture(Texture *tex) {
}
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,
get_texture_filter_type(magfilter, true));
get_texture_filter_type(magfilter, tex->get_format(), true));
if (tex->get_format() == Texture::F_depth_component) {
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_wrap_mode(Texture::WrapMode wm) const;
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 GLenum get_component_type(Texture::ComponentType component_type);
GLint get_external_image_format(Texture *tex) const;
+7 -2
View File
@@ -55,8 +55,8 @@ Texture(const string &name) :
{
_primary_file_num_channels = 0;
_alpha_file_channel = 0;
_magfilter = FT_linear;
_minfilter = FT_linear;
_magfilter = FT_default;
_minfilter = FT_default;
_wrap_u = WM_repeat;
_wrap_v = WM_repeat;
_wrap_w = WM_repeat;
@@ -1639,6 +1639,8 @@ string_filter_type(const string &string) {
return FT_linear_mipmap_linear;
} else if (cmp_nocase_uh(string, "shadow") == 0) {
return FT_shadow;
} else if (cmp_nocase_uh(string, "default") == 0) {
return FT_default;
} else {
return FT_invalid;
}
@@ -3394,6 +3396,9 @@ operator << (ostream &out, Texture::FilterType ft) {
case Texture::FT_shadow:
return out << "shadow";
case Texture::FT_default:
return out << "default";
case Texture::FT_invalid:
return out << "invalid";
}
+4
View File
@@ -130,6 +130,10 @@ PUBLISHED:
// The OpenGL ARB_shadow extension can be thought of as a kind of filtering.
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.
FT_invalid
+4 -4
View File
@@ -28,10 +28,10 @@
#include "pvector.h"
/*
#ifndef CPPPARSER
#include "../collide/collisionSolid.h"
#include "../collide/collisionNode.h"
#endif
//#ifndef CPPPARSER
//#include "../collide/collisionSolid.h"
//#include "../collide/collisionNode.h"
//#endif
*/
////////////////////////////////////////////////////////////////////
// Class : PortalNode