I gues Shader2 starting to come together.
This commit is contained in:
		@@ -17,7 +17,8 @@ ShaderLoader::ShaderLoader(
 | 
				
			|||||||
  const std::string name
 | 
					  const std::string name
 | 
				
			||||||
) :
 | 
					) :
 | 
				
			||||||
  AssetLoader(assetManager, name),
 | 
					  AssetLoader(assetManager, name),
 | 
				
			||||||
  state(ShaderLoaderState::INITIAL)
 | 
					  state(ShaderLoaderState::INITIAL),
 | 
				
			||||||
 | 
					  shader(std::make_shared<ShaderProgram2>())
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -26,10 +27,10 @@ void ShaderLoader::updateAsync() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void ShaderLoader::updateSync() {
 | 
					void ShaderLoader::updateSync() {
 | 
				
			||||||
  if(state != ShaderLoaderState::INITIAL) return;
 | 
					  if(state != ShaderLoaderState::INITIAL) return;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  this->state = ShaderLoaderState::LOADING;
 | 
					  this->state = ShaderLoaderState::LOADING;
 | 
				
			||||||
  assertFalse(loaded, "ShaderLoader already loaded.");
 | 
					  assertFalse(loaded, "ShaderLoader already loaded.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Shorthand.
 | 
				
			||||||
  auto sm = this->getAssetManager()->getGame()->shaderManager;
 | 
					  auto sm = this->getAssetManager()->getGame()->shaderManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Load the shader string
 | 
					  // Load the shader string
 | 
				
			||||||
@@ -43,21 +44,13 @@ void ShaderLoader::updateSync() {
 | 
				
			|||||||
  int32_t definedEntryPointCount = module->getDefinedEntryPointCount();
 | 
					  int32_t definedEntryPointCount = module->getDefinedEntryPointCount();
 | 
				
			||||||
  IComponentType** components = new IComponentType*[definedEntryPointCount + 1];
 | 
					  IComponentType** components = new IComponentType*[definedEntryPointCount + 1];
 | 
				
			||||||
  int32_t componentCount = 0;
 | 
					  int32_t componentCount = 0;
 | 
				
			||||||
 | 
					  components[componentCount++] = module;// First component is module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  components[componentCount++] = module;
 | 
					  // Get the entry point info and append to components list.
 | 
				
			||||||
 | 
					 | 
				
			||||||
  for(auto i = 0; i < definedEntryPointCount; i++) {
 | 
					  for(auto i = 0; i < definedEntryPointCount; i++) {
 | 
				
			||||||
    Slang::ComPtr<IEntryPoint> ep;
 | 
					    Slang::ComPtr<IEntryPoint> ep;
 | 
				
			||||||
    auto result = module->getDefinedEntryPoint(i, ep.writeRef());
 | 
					    auto result = module->getDefinedEntryPoint(i, ep.writeRef());
 | 
				
			||||||
 | 
					    if(result != SLANG_OK) assertUnreachable("Failed to get entry point.");
 | 
				
			||||||
    if(result != SLANG_OK) {
 | 
					 | 
				
			||||||
      assertUnreachable("Failed to get entry point.");
 | 
					 | 
				
			||||||
      return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    auto name = ep->getFunctionReflection()->getName();
 | 
					 | 
				
			||||||
    std::cout << "Found entry point: " << name << std::endl;
 | 
					 | 
				
			||||||
    entryPoints.push_back(std::string(name));
 | 
					 | 
				
			||||||
    components[componentCount++] = ep;
 | 
					    components[componentCount++] = ep;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -80,6 +73,42 @@ void ShaderLoader::updateSync() {
 | 
				
			|||||||
    return;
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Create the shader program.
 | 
				
			||||||
 | 
					  Slang::ComPtr<IBlob> blob;
 | 
				
			||||||
 | 
					  slang::ProgramLayout* layout = program->getLayout();
 | 
				
			||||||
 | 
					  std::vector<std::shared_ptr<ShaderEntry>> shaderEntries;
 | 
				
			||||||
 | 
					  for(auto i = 0; i < definedEntryPointCount; i++) {
 | 
				
			||||||
 | 
					    // Get the code
 | 
				
			||||||
 | 
					    auto result = linkedProgram->getEntryPointCode(
 | 
				
			||||||
 | 
					      i,
 | 
				
			||||||
 | 
					      0,
 | 
				
			||||||
 | 
					      blob.writeRef(),
 | 
				
			||||||
 | 
					      diagnostics.writeRef()
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(diagnostics) {
 | 
				
			||||||
 | 
					      assertUnreachable("%s\n", (const char*) diagnostics->getBufferPointer());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Get the stage information
 | 
				
			||||||
 | 
					    auto entryPointReflection = layout->getEntryPointByIndex(0);
 | 
				
			||||||
 | 
					    auto stage = entryPointReflection->getStage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Create the shader entry
 | 
				
			||||||
 | 
					    auto shaderEntry = std::make_shared<ShaderEntry>();
 | 
				
			||||||
 | 
					    shaderEntry->init(
 | 
				
			||||||
 | 
					      stage,
 | 
				
			||||||
 | 
					      std::string((const char*)blob->getBufferPointer())
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Add to the list
 | 
				
			||||||
 | 
					    shaderEntries.push_back(shaderEntry);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Create the shader program.
 | 
				
			||||||
 | 
					  shader->init(shaderEntries);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Finished loading.
 | 
				
			||||||
  delete [] components;
 | 
					  delete [] components;
 | 
				
			||||||
  this->state = ShaderLoaderState::LOADED;
 | 
					  this->state = ShaderLoaderState::LOADED;
 | 
				
			||||||
  this->loaded = true;
 | 
					  this->loaded = true;
 | 
				
			||||||
@@ -89,38 +118,14 @@ std::string ShaderLoader::getAssetType() const {
 | 
				
			|||||||
  return ShaderLoader::ASSET_TYPE;
 | 
					  return ShaderLoader::ASSET_TYPE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
std::string ShaderLoader::getEntryPointCode(const std::string &entryPoint) {
 | 
					std::shared_ptr<IShaderProgram2> ShaderLoader::getShader() {
 | 
				
			||||||
  assertTrue(loaded, "ShaderLoader not loaded.");
 | 
					  assertNotNull(shader, "ShaderLoader shader is null.");
 | 
				
			||||||
  assertNotNull(linkedProgram, "ShaderLoader linkedProgram is null.");
 | 
					  return shader;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Get the entry point index
 | 
					 | 
				
			||||||
  int32_t entryIndex = -1;
 | 
					 | 
				
			||||||
  for(auto i = 0; i < entryPoints.size(); i++) {
 | 
					 | 
				
			||||||
    if(entryPoints[i] != entryPoint) continue;
 | 
					 | 
				
			||||||
    entryIndex = i;
 | 
					 | 
				
			||||||
    break;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  assertTrue(entryIndex != -1, "EntryPoint not found.");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Find the entry point code
 | 
					 | 
				
			||||||
  Slang::ComPtr<IBlob> blob;
 | 
					 | 
				
			||||||
  Slang::ComPtr<IBlob> diagnostics;
 | 
					 | 
				
			||||||
  auto result = linkedProgram->getEntryPointCode(
 | 
					 | 
				
			||||||
    entryIndex,
 | 
					 | 
				
			||||||
    0,
 | 
					 | 
				
			||||||
    blob.writeRef(),
 | 
					 | 
				
			||||||
    diagnostics.writeRef()
 | 
					 | 
				
			||||||
  );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if(diagnostics) {
 | 
					 | 
				
			||||||
    assertUnreachable("%s\n", (const char*) diagnostics->getBufferPointer());
 | 
					 | 
				
			||||||
    return "";
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  return std::string((const char*)blob->getBufferPointer());
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ShaderLoader::~ShaderLoader() {
 | 
					ShaderLoader::~ShaderLoader() {
 | 
				
			||||||
 | 
					  shader = nullptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(linkedProgram) {
 | 
					  if(linkedProgram) {
 | 
				
			||||||
    linkedProgram->release();
 | 
					    linkedProgram->release();
 | 
				
			||||||
    linkedProgram = nullptr;
 | 
					    linkedProgram = nullptr;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,7 @@
 | 
				
			|||||||
#include "asset/AssetLoader.hpp"
 | 
					#include "asset/AssetLoader.hpp"
 | 
				
			||||||
#include "asset/AssetDataLoader.hpp"
 | 
					#include "asset/AssetDataLoader.hpp"
 | 
				
			||||||
#include "display/shader/ShaderManager.hpp"
 | 
					#include "display/shader/ShaderManager.hpp"
 | 
				
			||||||
 | 
					#include "display/shader/ShaderProgram2.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Dawn {
 | 
					namespace Dawn {
 | 
				
			||||||
  enum class ShaderLoaderState {
 | 
					  enum class ShaderLoaderState {
 | 
				
			||||||
@@ -18,13 +19,14 @@ namespace Dawn {
 | 
				
			|||||||
  class ShaderLoader : public AssetLoader {
 | 
					  class ShaderLoader : public AssetLoader {
 | 
				
			||||||
    protected:
 | 
					    protected:
 | 
				
			||||||
      enum ShaderLoaderState state;
 | 
					      enum ShaderLoaderState state;
 | 
				
			||||||
 | 
					      std::shared_ptr<ShaderProgram2> shader;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public:
 | 
					    public:
 | 
				
			||||||
      const static std::string ASSET_TYPE;
 | 
					      const static std::string ASSET_TYPE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      std::vector<std::string> entryPoints;
 | 
					 | 
				
			||||||
      Slang::ComPtr<IComponentType> linkedProgram;
 | 
					      Slang::ComPtr<IComponentType> linkedProgram;
 | 
				
			||||||
      Slang::ComPtr<IComponentType> program;
 | 
					      Slang::ComPtr<IComponentType> program;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      IModule* module;
 | 
					      IModule* module;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ShaderLoader(
 | 
					      ShaderLoader(
 | 
				
			||||||
@@ -34,7 +36,14 @@ namespace Dawn {
 | 
				
			|||||||
      void updateSync() override;
 | 
					      void updateSync() override;
 | 
				
			||||||
      void updateAsync() override;
 | 
					      void updateAsync() override;
 | 
				
			||||||
      std::string getAssetType() const override;
 | 
					      std::string getAssetType() const override;
 | 
				
			||||||
      std::string getEntryPointCode(const std::string &entryPoint);
 | 
					      
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Retreives the shader program for this loader.
 | 
				
			||||||
 | 
					       * 
 | 
				
			||||||
 | 
					       * @return std::shared_ptr<IShaderProgram2> 
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      std::shared_ptr<IShaderProgram2> getShader();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ~ShaderLoader();
 | 
					      ~ShaderLoader();
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -10,4 +10,5 @@ target_sources(${DAWN_TARGET_NAME}
 | 
				
			|||||||
    IShaderStage.cpp
 | 
					    IShaderStage.cpp
 | 
				
			||||||
    ShaderManager.cpp
 | 
					    ShaderManager.cpp
 | 
				
			||||||
    ShaderManagerSlangFileSystem.cpp
 | 
					    ShaderManagerSlangFileSystem.cpp
 | 
				
			||||||
 | 
					    IShaderProgram2.cpp
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
							
								
								
									
										21
									
								
								src/dawn/display/shader/IShaderProgram2.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/dawn/display/shader/IShaderProgram2.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					// Copyright (c) 2024 Dominic Masters
 | 
				
			||||||
 | 
					// 
 | 
				
			||||||
 | 
					// This software is released under the MIT License.
 | 
				
			||||||
 | 
					// https://opensource.org/licenses/MIT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "IShaderProgram2.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using namespace Dawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					IShaderEntry::~IShaderEntry() {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void IShaderProgram2::init(
 | 
				
			||||||
 | 
					  const std::vector<std::shared_ptr<ShaderEntry>> &entries
 | 
				
			||||||
 | 
					) {
 | 
				
			||||||
 | 
					  this->entries = entries;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					IShaderProgram2::~IShaderProgram2() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -5,19 +5,49 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
#include "dawn.hpp"
 | 
					#include "dawn.hpp"
 | 
				
			||||||
 | 
					#include "slang.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using namespace slang;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Dawn {
 | 
					namespace Dawn {
 | 
				
			||||||
  class IShaderEntry {
 | 
					  class ShaderEntry;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  class IShaderEntry {
 | 
				
			||||||
 | 
					    public:
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Initialize the IShaderEntry object
 | 
				
			||||||
 | 
					       * 
 | 
				
			||||||
 | 
					       * @param stage The stage of the shader entry.
 | 
				
			||||||
 | 
					       * @param code The code of the shader entry.
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      virtual void init(
 | 
				
			||||||
 | 
					        const SlangStage &stage,
 | 
				
			||||||
 | 
					        const std::string &code
 | 
				
			||||||
 | 
					      ) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Destroy the IShaderEntry object
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      virtual ~IShaderEntry();
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  class IShaderProgram2 {
 | 
					  class IShaderProgram2 {
 | 
				
			||||||
    private:
 | 
					 | 
				
			||||||
      std::vector<IShaderEntry> entries;
 | 
					 | 
				
			||||||
      
 | 
					 | 
				
			||||||
    protected:
 | 
					    protected:
 | 
				
			||||||
 | 
					      std::vector<std::shared_ptr<ShaderEntry>> entries;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public:
 | 
					    public:
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Initialize the IShaderProgram2 object
 | 
				
			||||||
 | 
					       * 
 | 
				
			||||||
 | 
					       * @param entries The list of shader entries to initialize with.
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      virtual void init(
 | 
				
			||||||
 | 
					        const std::vector<std::shared_ptr<ShaderEntry>> &entries
 | 
				
			||||||
 | 
					      ) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Destroy the IShaderProgram2 object
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      virtual ~IShaderProgram2();
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -11,4 +11,5 @@ target_sources(${DAWN_TARGET_NAME}
 | 
				
			|||||||
    SimpleTexturedShader.cpp
 | 
					    SimpleTexturedShader.cpp
 | 
				
			||||||
    UIShader.cpp
 | 
					    UIShader.cpp
 | 
				
			||||||
    ShaderParameter.cpp
 | 
					    ShaderParameter.cpp
 | 
				
			||||||
 | 
					    ShaderProgram2.cpp
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
							
								
								
									
										28
									
								
								src/dawnopengl/display/shader/ShaderProgram2.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								src/dawnopengl/display/shader/ShaderProgram2.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					// Copyright (c) 2024 Dominic Masters
 | 
				
			||||||
 | 
					// 
 | 
				
			||||||
 | 
					// This software is released under the MIT License.
 | 
				
			||||||
 | 
					// https://opensource.org/licenses/MIT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "ShaderProgram2.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using namespace Dawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void ShaderEntry::init(
 | 
				
			||||||
 | 
					  const SlangStage &stage,
 | 
				
			||||||
 | 
					  const std::string &code
 | 
				
			||||||
 | 
					) {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ShaderEntry::~ShaderEntry() {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// // //
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void ShaderProgram2::init(
 | 
				
			||||||
 | 
					  const std::vector<std::shared_ptr<ShaderEntry>> &entries
 | 
				
			||||||
 | 
					) {
 | 
				
			||||||
 | 
					  IShaderProgram2::init(entries);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ShaderProgram2::~ShaderProgram2() {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										28
									
								
								src/dawnopengl/display/shader/ShaderProgram2.hpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								src/dawnopengl/display/shader/ShaderProgram2.hpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					// Copyright (c) 2024 Dominic Masters
 | 
				
			||||||
 | 
					// 
 | 
				
			||||||
 | 
					// This software is released under the MIT License.
 | 
				
			||||||
 | 
					// https://opensource.org/licenses/MIT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#pragma once
 | 
				
			||||||
 | 
					#include "display/shader/IShaderProgram2.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Dawn {
 | 
				
			||||||
 | 
					  class ShaderEntry {
 | 
				
			||||||
 | 
					    protected:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public:
 | 
				
			||||||
 | 
					      void init(
 | 
				
			||||||
 | 
					        const SlangStage &stage,
 | 
				
			||||||
 | 
					        const std::string &code
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					      ~ShaderEntry();
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  class ShaderProgram2 : public IShaderProgram2 {
 | 
				
			||||||
 | 
					    public:
 | 
				
			||||||
 | 
					      void init(
 | 
				
			||||||
 | 
					        const std::vector<std::shared_ptr<ShaderEntry>> &entries
 | 
				
			||||||
 | 
					      ) override;
 | 
				
			||||||
 | 
					      ~ShaderProgram2();
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -34,15 +34,15 @@ void Game::initManagers() {
 | 
				
			|||||||
  auto sl = assetManager->get<ShaderLoader>("shaders/hello-world.slang");
 | 
					  auto sl = assetManager->get<ShaderLoader>("shaders/hello-world.slang");
 | 
				
			||||||
  sl->loadImmediately();
 | 
					  sl->loadImmediately();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  auto code1 = sl->getEntryPointCode("vertexMain");
 | 
					  // auto code1 = sl->getEntryPointCode("vertexMain");
 | 
				
			||||||
  std::fstream file("vertexMain.glsl", std::ios::out);
 | 
					  // std::fstream file("vertexMain.glsl", std::ios::out);
 | 
				
			||||||
  file << code1;
 | 
					  // file << code1;
 | 
				
			||||||
  file.close();
 | 
					  // file.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  auto code2 = sl->getEntryPointCode("fragmentMain");
 | 
					  // auto code2 = sl->getEntryPointCode("fragmentMain");
 | 
				
			||||||
  std::fstream file2("fragmentMain.glsl", std::ios::out);
 | 
					  // std::fstream file2("fragmentMain.glsl", std::ios::out);
 | 
				
			||||||
  file2 << code2;
 | 
					  // file2 << code2;
 | 
				
			||||||
  file2.close();
 | 
					  // file2.close();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Game::~Game() {
 | 
					Game::~Game() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user