| 97 | //========================================================================== |
| 98 | |
| 99 | void 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 | // |
no test coverage detected