add GetChars() accessors to many FString uses where const char* is wanted.
By no means complete, it's just a start to get rid of that automatic type conversion operator.
This commit is contained in:
parent
a3eb1ec1fd
commit
1717ff47b2
28 changed files with 92 additions and 97 deletions
|
|
@ -40,7 +40,7 @@
|
|||
VkRenderPassManager::VkRenderPassManager(VulkanRenderDevice* fb) : fb(fb)
|
||||
{
|
||||
FString path = M_GetCachePath(true);
|
||||
CreatePath(path);
|
||||
CreatePath(path.GetChars());
|
||||
CacheFilename = path + "/pipelinecache.zdpc";
|
||||
|
||||
PipelineCacheBuilder builder;
|
||||
|
|
@ -49,7 +49,7 @@ VkRenderPassManager::VkRenderPassManager(VulkanRenderDevice* fb) : fb(fb)
|
|||
try
|
||||
{
|
||||
FileReader fr;
|
||||
if (fr.OpenFile(CacheFilename))
|
||||
if (fr.OpenFile(CacheFilename.GetChars()))
|
||||
{
|
||||
std::vector<uint8_t> data;
|
||||
data.resize(fr.GetLength());
|
||||
|
|
@ -71,7 +71,7 @@ VkRenderPassManager::~VkRenderPassManager()
|
|||
try
|
||||
{
|
||||
auto data = PipelineCache->GetCacheData();
|
||||
std::unique_ptr<FileWriter> fw(FileWriter::Open(CacheFilename));
|
||||
std::unique_ptr<FileWriter> fw(FileWriter::Open(CacheFilename.GetChars()));
|
||||
if (fw)
|
||||
fw->Write(data.data(), data.size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ void VkPPShader::Reset()
|
|||
|
||||
FString VkPPShader::LoadShaderCode(const FString &lumpName, const FString &defines, int version)
|
||||
{
|
||||
int lump = fileSystem.CheckNumForFullName(lumpName);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpName.GetChars());
|
||||
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName.GetChars());
|
||||
auto sp = fileSystem.ReadFile(lump);
|
||||
FString code = GetStringFromLump(lump);
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ bool VkShaderManager::CompileNextShader()
|
|||
{
|
||||
// user shaders
|
||||
|
||||
const FString& name = ExtractFileBase(usershaders[i].shader);
|
||||
const FString& name = ExtractFileBase(usershaders[i].shader.GetChars());
|
||||
FString defines = defaultshaders[usershaders[i].shaderType].Defines + usershaders[i].defines;
|
||||
|
||||
VkShaderProgram prog;
|
||||
prog.vert = LoadVertShader(name, mainvp, defines);
|
||||
prog.frag = LoadFragShader(name, mainfp, usershaders[i].shader, defaultshaders[usershaders[i].shaderType].lightfunc, defines, true, compilePass == GBUFFER_PASS);
|
||||
prog.vert = LoadVertShader(name, mainvp, defines.GetChars());
|
||||
prog.frag = LoadFragShader(name, mainfp, usershaders[i].shader.GetChars(), defaultshaders[usershaders[i].shaderType].lightfunc, defines.GetChars(), true, compilePass == GBUFFER_PASS);
|
||||
mMaterialShaders[compilePass].push_back(std::move(prog));
|
||||
|
||||
compileIndex++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue