rodecomp/Source/Render/DX7/TextureBindingDX7.cpp
ragnarok-clanker 643cf8e993 Maintenance: [forced, user-approved] R10a: remove the invented DX7 view structs RendererDX7Operations {owner, device}, QueuedDrawingD
Batch #10263 by ragnarok-clanker: forced by an admin (1 lower score(s), 16 changed function(s)); checked with 333 compiled unit(s), including every includer of Source/Render/DX7/DeviceOwnerDX7.h, Source/Render/DX7/QueuedDrawingDX7.h, Source/Render/DX9/RendererFogDX9.h, Source/Render/RendererDX7.h, Source/Render/DX7/RendererDX7Operations.h, Source/Render/DX7/TextureBindingDX7.h.
Deletes: Source/Render/DX7/RendererDX7Operations.h, Source/Render/DX7/TextureBindingDX7.h
2026-11-03 14:00:14 +00:00

21 lines
699 B
C++

#include "Render/DX7/RenderSystemDX7.h"
#include "Render/RendererDX7.h"
#include "Render/DX7/TextureDX7.h"
// OFFSET: 0x0055F7D0
// FUNCTION: fn_02119
void CRendererDX7::SetTexture(unsigned stage, CTextureDX7* texture) {
if (stage == 0) {
if (this->boundTexture != texture) {
this->device->SetTexture(0, texture ? texture->NativeSurface() : nullptr);
this->boundTexture = texture;
}
} else if (stage == 1) {
if (this->boundLightmap != texture) {
this->device->SetTexture(1, texture ? texture->NativeSurface() : nullptr);
this->boundLightmap = texture;
}
} else {
this->device->SetTexture(stage, texture ? texture->NativeSurface() : nullptr);
}
}