MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / SetCameraToTexture

Function SetCameraToTexture

src/r_data/r_canvastexture.cpp:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97//==========================================================================
98
99void SetCameraToTexture(AActor *viewpoint, const FString &texturename, double fov)
100{
101 FTextureID textureid = TexMan.CheckForTexture(texturename.GetChars(), ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
102 if (textureid.isValid())
103 {
104 // Only proceed if the texture actually has a canvas.
105 auto tex = TexMan.GetGameTexture(textureid);
106 if (tex && tex->isHardwareCanvas()) // Q: how to deal with the software renderer here?
107 {
108 viewpoint->Level->canvasTextureInfo.Add(viewpoint, textureid, fov);
109 }
110 }
111}
112
113//==========================================================================
114//

Callers 1

Calls 6

CheckForTextureMethod · 0.80
GetGameTextureMethod · 0.80
GetCharsMethod · 0.45
isValidMethod · 0.45
isHardwareCanvasMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected