FetchContent_Declare(
mikktspace
GIT_REPOSITORY https://github.com/mmikk/MikkTSpace/
GIT_TAG master
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_GetProperties(mikktspace)
if(NOT mikktspace_POPULATED)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <fstream> | |
#include <filesystem> | |
#include <iostream> | |
#include <memory> | |
#include <unordered_map> | |
#include <string> | |
#include <utility> | |
#include <glad/gl.h> |
i was wondering if we should/could list common errors in the gl get started thing too, after debugcallback/renderdoc chapters or probably in some appendix, if you have more of those, let me know then we can compile those together into some comprehensive unfuck gl list
-
you use glad and its giving you a hard time, symbols not found, multiple definitions etc
- you most likely did just generate the headers on dav1d's site and manually downloaded the zip and all that bs some time ago
- if you cant be bothered to use cmake and let cmake handle all that for you, check the timestamp when you generated it last time, and if its (most likely) old, regenerate it again, will most likely fix it
- use cmake to fetch glad and it will handle gl header generation
-
nothing works:
- get rid of GLCALL/GLCHECK macros, most of them use glGetError incorrectly anyway
-
setup glDebugMessageCallback see here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float3 HableToneMap(float3 color) | |
{ | |
float A = 0.22;//Shoulder Strength | |
float B = 0.30;//Linear Strength | |
float C = 0.10;//Linear Angle | |
float D = 0.20;//Toe Strength | |
float E = 0.01;//Toe Numerator | |
float F = 0.30;//Toe Denominator | |
color = max(0, color - 0.004f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 core | |
out vec4 color; | |
uniform sampler2D tileMap; | |
uniform sampler2DArray atlas; //because atlas is now a Texture array we need the proper sampler type for that | |
uniform sampler2D lightMap; | |
uniform sampler1D ambient; //1D gradient texture that is used for day-night changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <spdlog/spdlog.h> | |
#include <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/vec3.hpp> | |
#include <fstream> | |
#include <string> | |
#include <string_view> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class JoltPhysicsWorld : IPhysicsWorld | |
{ | |
private const uint MaxBodies = 1024; | |
private const uint NumBodyMutexes = 0; | |
private const uint MaxBodyPairs = 1024; | |
private const uint MaxContactConstraints = 1024; | |
private const int MaxPhysicsJobs = 2048; | |
private const int MaxPhysicsBarriers = 8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IShaderParser | |
{ | |
string ParseShader(string? shaderSource); | |
} | |
internal sealed class ShaderParser : IShaderParser | |
{ | |
private static readonly Regex _includeRegex = | |
new Regex("^[ ]*#[ ]*include[ ]+[\\\"<](?'include'.*)[\\\">].*", RegexOptions.Compiled | RegexOptions.IgnoreCase); | |
private readonly IShaderIncludeHandler _includeHandler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Numerics; | |
using SixLabors.ImageSharp; | |
using SixLabors.ImageSharp.PixelFormats; | |
using Vortice.Direct3D; | |
using Vortice.Direct3D11; | |
using Vortice.DXGI; | |
using Vortice.Mathematics; | |
using Vortice.WIC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -o pipefail | |
set -o errtrace | |
set -o nounset | |
set -o errexit | |
KEYMAP='us' | |
LANG='en_US' |
NewerOlder