assimp demo loading 3d model

本小妞迷上赌 提交于 2019-12-11 02:49:21

问题


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.

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

and probably the example was fixed so this error seems not to reappear. But it shows another one, my case:

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

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


回答1:


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



来源:https://stackoverflow.com/questions/19841602/assimp-demo-loading-3d-model

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!