Код: Выделить всё
#pragma once
#include
#include
struct vertexBufferElement
{
unsigned int type;
unsigned int count;
bool normalised;
};
class vertexBufferLayout
{
private:
std::vector mElements;
public:
vertexBufferLayout();
template
void Push(int count)
{
static_assert(false);
}
template
void Push(int count)
{
//ERROR HERE
mElements.push_back({ GL_FLOAT, count, false });
}
template
void Push(int count)
{
//ERROR HERE
mElements.push_back({ GL_UNSIGNED_INT, count, false });
}
template
void Push(int count)
{
//ERROR HERE
mElements.push_back({ GL_UNSIGNED_BYTE, count, true });
}
};
Я получаю сообщение об ошибке «нет экземпляра перегруженной функции».
Что является причиной этого?
Подробнее здесь: https://stackoverflow.com/questions/781 ... -data-type
Мобильная версия