GLEW
debian を stretch から buster にアップグレードし、からに更新し2.0.0-3
た2.1.0-2
後、アプリケーションが動作しなくなりました。より正確には、黒い画面だけが表示されます。シェーダーは正常にコンパイルされますが、それ以上は何もありません。以下は、私のプログラムからのコードの抜粋です。
void initGL() {
std::cout << "Starting GLFW context, OpenGL 3.3" << std::endl;
// Init GLFW
if (!glfwInit()) std::cout << "GLFW init failed";
// Set all the required options for GLFW
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
// Create a GLFWwindow object that we can use for GLFW's functions
window = FULLSCREEN == true ?
glfwCreateWindow(WIN_W, WIN_H, "Algine", glfwGetPrimaryMonitor(), nullptr) :
glfwCreateWindow(WIN_W, WIN_H, "Algine", nullptr, nullptr);
glfwMakeContextCurrent(window);
// Set the required callback functions
glfwSetKeyCallback(window, key_callback);
glfwSetWindowSizeCallback(window, window_size_callback);
// Set this to true so GLEW knows to use a modern approach to retrieving function pointers and extensions
// glewExperimental = GL_TRUE;
// Initialize GLEW to setup the OpenGL Function pointers
if (glewInit() != GLEW_NO_ERROR) std::cout << "GLEW init failed\n";
glEnable(GL_DEPTH_TEST);
glDepthMask(true);
//glCullFace(GL_BACK);
}
レンダリング:
while (!glfwWindowShouldClose(window)) {
currentTime = glfwGetTime();
frameCount++;
// If a second has passed.
if (currentTime - previousTime >= 1.0) {
// Display the frame count here any way you want.
std::cout << frameCount << " fps\n";
frameCount = 0;
previousTime = currentTime;
}
// Check if any events have been activiated (key pressed, mouse moved etc.) and call corresponding response functions
glfwPollEvents();
display();
glfwSwapBuffers(window);
}
Debian Buster を使用しています。アプリケーションでの GLFW + GLEW
問題が何であるかについてのアイデアはありますか?私は助けてくれてとても感謝しています!
更新:システムを Debian Stretch にロールバックしました。その後、手動でglew
バージョン2.1.0-2
(Buster にある) に更新したところ、すべて正常に動作しました。問題がドライバーや私が使用しているライブラリにない場合、Debian Buster 自体に問題があるのでしょうか?