Skip to content

Add support for OpenGL 2 #92

@barracuda156

Description

@barracuda156

Is your feature request related to a problem? Please describe.
Without GL2 support, the app is unusable on systems without GL3, it crashes on launch.

Describe the solution you'd like
Add/restore support for GL2. imgui supports it already: https://github.com/ocornut/imgui/blob/43a90adc618207da0e9ef6274f1b172c76f220ae/backends/imgui_impl_opengl2.cpp
But these sources are missing in the bundled copy.

Additional context
Probably the failure happens here:

namespace ImPlay {
Window::Window(Config* config) : Player(config) {
  initGLFW();
  window = glfwCreateWindow(1280, 720, PLAYER_NAME, nullptr, nullptr);
  if (window == nullptr) throw std::runtime_error("Failed to create window!");
#ifdef _WIN32
  hwnd = glfwGetWin32Window(window);
  if (SUCCEEDED(OleInitialize(nullptr))) oleOk = true;
#endif

  initGui();
  installCallbacks(window);
  ImGui_ImplGlfw_InitForOpenGL(window, true);
}

And the error is

$ implay -v
GLFW [65543]: The requested client API version is unavailable
Error: Failed to create window!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions