- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试制作 Qt 控制台应用程序,它将启动计算着色器,但在启动时会出现以下错误:
QOpenGLShader::compile(Compute): 0(1) : error C0201: unsupported version 44
0(1) : error C0206: invalid token "<invalid atom 284073152>" in version line
Shader 已经过测试并正确无误(它在我的基于 openFrameworks 的程序中运行良好)并以
开始#version 440
在基于 Qt 的程序中,我使用以下代码在 main.cpp 中初始化 OGL 上下文
QSurfaceFormat surfaceFormat;
surfaceFormat.setMajorVersion(4);
surfaceFormat.setMinorVersion(4);
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(surfaceFormat);
QOpenGLContext openGLContext;
openGLContext.create();
if(!openGLContext.isValid())
{
qDebug()<<"Failed to create openGL context";
return 0;
}
QOffscreenSurface surface;
surface.create();
if(!surface.isValid())
{
qDebug()<<"Failed to create surface";
}
然后编译着色器
QOpenGLShaderProgram compute;
compute.addShaderFromSourceFile(QOpenGLShader::Compute,":/shaders/cull.glsl");
compute.link();
是否有任何我遗漏的特定于 Qt 的东西?
最佳答案
所以这个问题有点出乎我的意料。 Shader 文件由 Visual Studio 保存,因此它具有 windows 编码。 OpenFrameworks 程序也是由 Visual Studio 构建的,因此它在启动着色器方面没有问题,但 Qt 无法处理 windows 编码的 EOL。以 UTF-8 格式重新保存着色器文件已修复问题。
关于glsl 着色器的 C++ Qt "unsupported version"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41713296/
Apple M1 芯片上的 Mac OS 11.6 节点版本是17.0.1 % node -v v17.0.1 这个错误似乎真的来 self 无法辨别的任何地方。 (我检查了我的软件更新,没有最近的操
运行 cv2.getRectSubPix(img, (5,5), (0,0)) 抛出错误: OpenCV Error: Unsupported format or combination of for
不可能在 itunesconnect 中发送应用程序的新版本。虽然上周,同样的版本发送发生了。在代码中,我只是改了一个按钮的名字,没有再改哪里。 但总是报错: 错误 ITMS-9000:“不支持的架构
鉴于下面的 HTML,我尝试使用 jQuery 来匹配所有具有类“foo”的跨度的列表项,并且该跨度应包含文本“relevant”。 Some text relevant Some more
Azure 开始出现以下错误: Unsupported token. Unable to initialize the authorization context. 每当我尝试更改我的应用程序时,我都
尝试安装friday软件包时,出现错误 Preprocessing library friday-0.2.2.0... src/Vision/Detector/Edge.hs:3:14: Unsupp
Azure 开始出现以下错误: Unsupported token. Unable to initialize the authorization context. 每当我尝试更改我的应用程序时,我都
我的代码抛出此错误 Failed to load resource: unsupported url在以下行: self.$el.find('.capturedImage').attr('src',
首先,请原谅它已经被问过或者可以很容易地通过谷歌找到。我发布这个是因为我的时间有限。这是录制音频和视频的代码。 stopPreview(); Log.d("stream
我正在尝试在 Android 上实现应用索引。 我有一个 Intent 过滤器,如下:
对于在 WAS 8.5 中运行的应用程序客户端,我们有代码创建套接字失败并出现以下错误。 SSLSocketFactory factory = (SSLSocketFactory) SSLSo
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
我正在尝试从序列中获取生成的 key 。(使用 Servlet 和 Oracle10) 以下是我的代码: query ="insert into TABLE_NAME(COL1,COL2,COL3)
我的项目中有这个功能: def clean(self): if self.id_document_type == 'BC': now = date.today()
我在尝试 ARKit 时出现黑屏并显示以下错误消息。 WWDC 2017 示例 PlacingObjects 在同一设备上运行没有问题。 [] >>> FigVirtualFramebufferGet
ffmpeg 缺乏对 AAC 的默认支持真的很烦人: 我的 ffmpeg 版本: ffmpeg version git-2020-05-02-0d81edc Copyright (c) 2000-20
以下 config.xml 导致错误: ... ... ... 错误信息: Error Image 代码库是继承的,据我所知
创建位图上下文时出现此错误: CGBitmapContextCreate:不支持的参数组合:8 个整数位/组件; 24 位/像素;三分量色彩空间; kCGImageAlphaNone; 7936 字节
使用 pandas 读取 .xlsx 文件时出错。看起来它正在打开文件,因为它能够读取列名的前 8 个字符,即 员工编号 但因此错误而失败。我看到很多关于这个的帖子,但最后一部分从来都不是这些错误
我尝试执行下面的代码,但它抛出以下错误消息: Error: Syntax error, unrecognized expression: unsupported pseudo: really-good
我是一名优秀的程序员,十分优秀!