Код: Выделить всё
ERROR::SHADER::VERTEX::COMPILATION_FAILED0:10(18): error: `ourTexture1' undeclared
0:10(10): error: no matching function for call to `texture(error, vec2)'; candidates are:
0:10(10): error: vec4 texture(sampler1D, float)
0:10(10): error: ivec4 texture(isampler1D, float)
0:10(10): error: uvec4 texture(usampler1D, float)
0:10(10): error: vec4 texture(sampler2D, vec2)
0:10(10): error: ivec4 texture(isampler2D, vec2)
0:10(10): error: uvec4 texture(usampler2D, vec2)
0:10(10): error: vec4 texture(sampler3D, vec3)
0:10(10): error:
ERROR::SHADER::PROGRAM::LINKING_FAILED
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
ApplyingTextureToOurShape.cpp
Код: Выделить всё
#include
#include
#define GLEW_STATIC
#include
#include
#include "shader.h"
const GLuint WIDTH = 800, HEIGHT = 600;
int main()
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
GLFWwindow *window = glfwCreateWindow (WIDTH, HEIGHT, "Learn OpenGL", nullptr,
nullptr);
int screenWidth, screenHeight;
glfwGetFramebufferSize(window, &screenWidth, &screenHeight);
if (nullptr == window)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79128507/errorshadervertexcompilation-failed01018-error-ourtexture1-undeclar[/url]
Мобильная версия