-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于使用glsl3.3版本报opengl报错问题 #1271
Comments
麻烦,问下原因 |
// This is public domain software and comes with // Example: OSG using an OpenGL 3.0 context. #include <osgViewer/Viewer> void configureShaders( osg::StateSet* stateSet )
} int main( int argc, char** argv )
} /* Building OSG for OpenGL 3.x OSG currently support OpenGL 3.x on Windows. This comment block describes the Get the draft gl3.h header file from OpenGL.org and put it in a folder called Open the cmake-gui and load OSG's top-level CmakeLists.txt. You'll need to make
Create your project files in cmake-gui as usual, and build OSG as usual. If you have an external project that will depend on OSG built for OpenGL 3.x, To verify your application is using a pure OpenGL 3.x context, set When your app begins rendering, it displays information about the actual context */ |
以上代码是例子 |
When using OpenGL Core profile, most state attributes and related modes are deprecated and will display warnings as in your terminal. For instance, GLmode 0xb50 means GL_LIGHTING, which only works under fixed pipeline and not recognized anymore in core profile cases. I would suggest remove those state attributes (e.g. Light, LightModel, Texgen, Texmat, Material) from your scene graph and use GLSL shaders to implement different rendering effects. These attributes are still useful under Compatible Profile (although very very old...) so there is actually no need to change anything on OSG side. |
的确是这个问题,不过,还得要像个办法,兼容固定管线 |
When choosing core profile, it means that you deprecate and throw away the fixed pipeline. Why still consider the compatiblity? |
刚刚学习了,兼容是不可能,看样子,只能用3.0的版本已经着色器去使用,否则OSG里面的灯光效果,全部都要修改成glsl |
|
原因:
暂时解决办法:在GraphicsWindowWin32::createContextImplementation函数里面加入
The text was updated successfully, but these errors were encountered: