简体   繁体   中英

Using both Opengl CORE functions along with Comptability profile - GLFW

I have this visual studio project where i can use both core and compat profile at the same time, by using: glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_ANY_PROFILE) ; but weirdly it doesn't work on another projects.

There are only two different types of profiles (at least in OpenGL 3.2+): A core profile supports only core functionality. A compatibility profile supports core functionality + all deprecated functionality. There is no profile that doesn't allow for core functionality.

GLFW_OPENGL_ANY_PROFILE means that you will get a profile type at random. This will either be a core or a compatibility profile (but it might be a different profile on different machines/drivers/applications). There is no way to predict which profile it will be.

From what you state, you simply want to use a compatibility profile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM