Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
qt creator unreference 异常
社区开发
1146
views ·
0
replies ·
To
floor
Go
野山菌
deepin
2016-08-30 18:29
Author
本帖最后由 chaloongjir 于 2016-8-30 10:30 编辑
在学习opengl
新建的项目,使用glfw和glew,已经在项目配置文件里添加了
LIBS
+=
-lglfw
-lGLEW-lGL但是还是报错,在main函数里调用自定义的shader类,头文件已包含
// Build and compile our shader program
ShaderObj ourShader("shaders/vert.vert", "shaders/frag.frag");
shader类的头文件是酱紫的
class Shader
{
public:
// 程序ID
GLuint Program;
// 构造器读取并创建Shader
ShaderObj(const GLchar * vertexSourcePath, const GLchar * fragmentSourcePath);
// 使用Program
void Use();
};
cpp是酱紫的
class ShaderObj
{
GLuint Program;
// Constructor generates the shader on the fly
Shader(const GLchar* vertexPath, const GLchar* fragmentPath)
{
//..........
}
// Uses the current shader
void Use()
{
//....
}
};
build构建的时候会报unreference to Shader::Shader(char const *, char const *)
unreference to Shader::use( )
这个怎么弄,在deepin里做的,不知道还缺了什么或许对熟悉的人来说这个问题很弱智,勿喷
Reply
Like 0
Favorite
View the author
All Replies
No replies yet
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
在学习opengl
新建的项目,使用glfw和glew,已经在项目配置文件里添加了LIBS += -lglfw -lGLEW-lGL但是还是报错,在main函数里调用自定义的shader类,头文件已包含
// Build and compile our shader program
ShaderObj ourShader("shaders/vert.vert", "shaders/frag.frag");
shader类的头文件是酱紫的
class Shader
{
public:
// 程序ID
GLuint Program;
// 构造器读取并创建Shader
ShaderObj(const GLchar * vertexSourcePath, const GLchar * fragmentSourcePath);
// 使用Program
void Use();
};
cpp是酱紫的
class ShaderObj
{
GLuint Program;
// Constructor generates the shader on the fly
Shader(const GLchar* vertexPath, const GLchar* fragmentPath)
{
//..........
}
// Uses the current shader
void Use()
{
//....
}
};
build构建的时候会报unreference to Shader::Shader(char const *, char const *)
unreference to Shader::use( )
这个怎么弄,在deepin里做的,不知道还缺了什么或许对熟悉的人来说这个问题很弱智,勿喷