Ankush's Garage
A collection of stuff made by Ankush Roy
Loading...
Searching...
No Matches
Common Namespace Reference

Classes

class  BaseProject
 Structure representing an project application instance. More...
 
class  ImGuiUI
 
class  ProjectManager
 

Functions

const std::filesystem::path & GetBasePath ()
 
SDL_GPUShader * LoadShader (SDL_GPUDevice *device, const std::string &shaderFilename, Uint32 samplerCount, Uint32 uniformBufferCount, Uint32 storageBufferCount, Uint32 storageTextureCount)
 This is a function that returns a compiled shader after taking the path to shader.
 
SDL_Surface * LoadImage (const std::string &imageFileName, int desiredChannels)
 

Function Documentation

◆ GetBasePath()

const std::filesystem::path & Common::GetBasePath ( )

◆ LoadImage()

SDL_Surface * Common::LoadImage ( const std::string & imageFileName,
int desiredChannels = 4 )
Warning
ONLY BMP IMAGES SUPPORTED BECAUSE I AM LAZY AND DIDN'T LOOK INTO OTHER FORMATS

◆ LoadShader()

SDL_GPUShader * Common::LoadShader ( SDL_GPUDevice * device,
const std::string & shaderFilename,
Uint32 samplerCount,
Uint32 uniformBufferCount,
Uint32 storageBufferCount,
Uint32 storageTextureCount )

This is a function that returns a compiled shader after taking the path to shader.

Returns
SDL_GPUShader a Uint32 that points to the compiled shader in the GPU.
// a simple vertex shader project
auto vertexShader = LoadShader(SDL_GPUDevice, "shader.vert", 0, 0, 0, 0);
SDL_GPUShader * LoadShader(SDL_GPUDevice *device, const std::string &shaderFilename, Uint32 samplerCount, Uint32 uniformBufferCount, Uint32 storageBufferCount, Uint32 storageTextureCount)
This is a function that returns a compiled shader after taking the path to shader.
Definition Common.cpp:36