assimp演示加载3d模型 [英] assimp demo loading 3d model
问题描述
我第一次尝试使用assimp加载3D模型.此处的示例来自lighthouse3d 链接
它编译没有错误.但是,我得到了与Jeffrey在帖子下方的评论中讨论的错误类似的错误.
Ready for OpenGL 3.3
Import of scene bench.obj succeeded.WARNING: 0:? : : Version number deprecate
d in OGL 3.0 forward compatible context driver
No errors.
WARNING: 0:? : : Version number deprecated in OGL 3.0 forward compatible cont
ext driver
ERROR: 0:35: ‘texture2D’ : function is removed in Forward Compatibile context
ERROR: 0:35: ‘texture2D’ : no matching overloaded function found (using implicit
conversion)
ERROR: 0:35: ‘assign’ : cannot convert from ‘const float’ to ’4-component vecto
r of float’
Vendor: Intel
Renderer: Intel(R) HD Graphics 2500
Version: 3.3.0 – Build 9.17.10.2875
GLSL: 3.30 – Build 9.17.10.2875
,并且示例可能已修复,因此似乎不会再次出现此错误.但这又显示了我的情况:
Ready for OpenGL 3.3
Import of scene bench.obj succeeded.WARNING: 0:? : : Version number deprecate
d in OGL 3.0 forward compatible context driver
No errors.
WARNING: 0:? : : Version number deprecated in OGL 3.0 forward compatible cont
ext driver
ERROR: 0:16: ‘output’ : reserved keyword
ERROR: 0:16: ‘output’ : syntax error syntax error
Vendor: Intel
Renderer: Intel(R) HD Graphics 4000
Version: 3.3.0 – Build 9.17.10.2843
GLSL: 3.30 – Build 9.17.10.2843
如果可能的话,我试图不加深对计算机图形学的了解,只需加载模型即可.
有什么建议吗?
Edit01: 我认为这将是着色器代码:链接
Edit02: 我在一个单独的文本文件dirlightdiffambpix.frag中进行了查找,并在其中显示了var输出链接 >
我想我已经修复了它,因为错误只是"output"是保留关键字,并且相应的var的名称应更改为...,例如output1
我已经在一个单独的文本文件dirlightdiffambpix.frag中进行了查找,并且 I'm having my first try with assimp loading a 3D model. The example is given here from lighthouse3d link It compiles without errors. However, I get a similar error to the error Jeffrey had discussed with the comments below the post. and probably the example was fixed so this error seems not to reappear. But it shows another one, my case: if possible, I'm trying not to get deeper in computer graphics, just simply load the model Any suggestion? Edit01:
I think this would be the shader code: link Edit02:
I've looked it up in a separate text file dirlightdiffambpix.frag and there is the var output in it link And I think I've fixed it already since the error is simply "output" is a reserved keyword and the corresponding var's name should be changed to ... output1 for example I've looked it up in a separate text file dirlightdiffambpix.frag and there is the var output in it link I've fixed it already since the error is simply "output" is a reserved keyword and the corresponding var's name should be changed to ... output1 for example and it simply works by then 这篇关于assimp演示加载3d模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!Ready for OpenGL 3.3
Import of scene bench.obj succeeded.WARNING: 0:? : " : Version number deprecate
d in OGL 3.0 forward compatible context driver
No errors.
WARNING: 0:? : " : Version number deprecated in OGL 3.0 forward compatible cont
ext driver
ERROR: 0:35: ‘texture2D’ : function is removed in Forward Compatibile context
ERROR: 0:35: ‘texture2D’ : no matching overloaded function found (using implicit
conversion)
ERROR: 0:35: ‘assign’ : cannot convert from ‘const float’ to ’4-component vecto
r of float’
Vendor: Intel
Renderer: Intel(R) HD Graphics 2500
Version: 3.3.0 – Build 9.17.10.2875
GLSL: 3.30 – Build 9.17.10.2875
Ready for OpenGL 3.3
Import of scene bench.obj succeeded.WARNING: 0:? : " : Version number deprecate
d in OGL 3.0 forward compatible context driver
No errors.
WARNING: 0:? : " : Version number deprecated in OGL 3.0 forward compatible cont
ext driver
ERROR: 0:16: ‘output’ : reserved keyword
ERROR: 0:16: ‘output’ : syntax error syntax error
Vendor: Intel
Renderer: Intel(R) HD Graphics 4000
Version: 3.3.0 – Build 9.17.10.2843
GLSL: 3.30 – Build 9.17.10.2843