small tweak

This commit is contained in:
cxgeorge 2001-11-28 04:12:22 +00:00
parent e9aac376ed
commit 67d1054ec7
2 changed files with 28 additions and 37 deletions

View File

@ -3980,12 +3980,11 @@ apply_texture(TextureContext *tc) {
int dirty = dtc->get_dirty_flags();
if( _pCurTexContext == dtc && dirty == 0) {
return; // tex already set (and possible problem in state-sorting?)
}
if (dirty) {
// If the texture image has changed, or if its use of mipmaps has
// changed, we need to re-create the image.
// changed, we need to re-create the image. Ignore other types of
// changes, which arent significant for dx
if((dirty & (Texture::DF_image | Texture::DF_mipmap)) != 0) {
// If this is *only* because of a mipmap change, issue a
// warning--it is likely that this change is the result of an
@ -4006,8 +4005,12 @@ apply_texture(TextureContext *tc) {
return;
}
}
dtc->clear_dirty_flags();
} else {
if(_pCurTexContext == dtc) {
return; // tex already set (and possible problem in state-sorting?)
}
}
Texture *tex = tc->_texture;
Texture::WrapMode wrapU,wrapV;
@ -4023,16 +4026,6 @@ apply_texture(TextureContext *tc) {
_CurTexWrapModeV = wrapV;
}
/*
#ifdef _DEBUG
Texture::WrapMode wrapval;
_d3dDevice->GetTextureStageState(0,D3DTSS_ADDRESSU,(DWORD*)&wrapval);
assert(get_texture_wrap_mode(wrapU) == wrapval);
_d3dDevice->GetTextureStageState(0,D3DTSS_ADDRESSV,(DWORD*)&wrapval);
assert(get_texture_wrap_mode(wrapV) == wrapval);
#endif
*/
uint aniso_degree=tex->get_anisotropic_degree();
Texture::FilterType ft=tex->get_magfilter();

View File

@ -241,8 +241,6 @@ protected:
void set_draw_buffer(const RenderBuffer &rb);
void set_read_buffer(const RenderBuffer &rb);
void bind_texture(TextureContext *tc);
// for storage of the flexible vertex format
char *_pCurFvfBufPtr,*_pFvfBufBasePtr;
INLINE void add_to_FVFBuf(void *data, size_t bytes) ;