Code: Select all
#define COUNT_ARGS_IMPL(macro, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, N, ...) _1
Ich habe getestet, ohne den Makronamen an count args und have zu übergeben Die Anzahl wurde vorab berechnet, bevor das Makro „shader_program“ ausgeführt wird, aber das Problem besteht weiterhin.


Wenn Sie die gesamte Datei möchten, ist dies hier.
Code: Select all
#pragma once
#define GLAD_GL_IMPLEMENTATION
#include
#include
#include
#include
#include
#include
static std::string readShader(const char const* location)
{
char fileName[256] = "shaders\\";
strcat_s(fileName, location);
std::ifstream stream(fileName);
if (!stream)
{
std::cerr