Ankush's Garage
A collection of stuff made by Ankush Roy
Loading...
Searching...
No Matches
Common.h
Go to the documentation of this file.
1#ifndef INCLUDE_COMMON_COMMON_H_
2#define INCLUDE_COMMON_COMMON_H_
3
4#include "Core/Common/pch.h"
5
6#ifdef TRACY_ENABLE
7 #include <tracy/Tracy.hpp>
8 #define PROFILE_SCOPE ZoneScoped
9 #define PROFILE_SCOPE_N(name) ZoneScopedN(name)
10 #define PROFILE_FRAME FrameMark
11#else
12 #define PROFILE_SCOPE
13 #define PROFILE_SCOPE_N(name)
14 #define PROFILE_FRAME
15#endif
16
17namespace Common
18{
32SDL_GPUShader *LoadShader(SDL_GPUDevice *device,
33 const std::string &shaderFilename,
34 Uint32 samplerCount,
35 Uint32 uniformBufferCount,
36 Uint32 storageBufferCount,
37 Uint32 storageTextureCount);
38
40SDL_Surface *LoadImage(const std::string &imageFileName, int desiredChannels = 4);
41} // namespace Common
42
43#endif // INCLUDE_COMMON_COMMON_H_
Definition Common.cpp:5
SDL_Surface * LoadImage(const std::string &imageFileName, int desiredChannels)
Definition Common.cpp:101
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