GithubHelp home page GithubHelp logo

SDL2 example crashes about pyimgui HOT 8 CLOSED

pyimgui avatar pyimgui commented on August 24, 2024
SDL2 example crashes

from pyimgui.

Comments (8)

swistakm avatar swistakm commented on August 24, 2024

This is really interesting. Let's take care of #70 first and then I'll take a look at this one.

from pyimgui.

swistakm avatar swistakm commented on August 24, 2024

Are you able to check and provide your SDL version? I will dig into sources.

from pyimgui.

AileenLumina avatar AileenLumina commented on August 24, 2024

I am using the 2.0.8 stable release build for Win32 x64 provided at the official website.

from pyimgui.

AileenLumina avatar AileenLumina commented on August 24, 2024

Might be relevant to mention that, after removing

    if SDL_GL_SetSwapInterval(1) < 0:
        print("Warning: Unable to set VSync! SDL Error: ", SDL_GetError())
        exit(1)

from the example, the issue remains.

from pyimgui.

swistakm avatar swistakm commented on August 24, 2024

Hmm... At least we know that this is not related to SDL_GL_SetSwapInterval().

I have checked and example runs on macOS. I have similar problem when running on Windows in VirtualBox.

I will have to test on real non-virtualized windows box to be really sure bit seems to be related to OpenGL version. We can't get information about currently bound VBO. Maybe it is simply not supported by OpenGL in current context? Can you provide some more information about your environment like system version OpenGL version available etc. I already know it's windows.

It's weird because example requests OpenGL 4.1 Core profile with SDL_GL_SetAttribute(). Still, I've tested this on VBox and it seems that SDL2 silently passes the 2.1 no matter which one was requested. Glfw in similar situation correctly raises exception.

Maybe try adding print(gl.glGetString(gl.GL_VERSION)) to see if SDL_GL_SetAttribute(SDL_GL_CONTEXT_..._VERSION, ...) calls are effective at all. If you get anything below 3.0 then I suppose that current PySDL2 integration won't work for you as it uses features of programmable pipeline that won't be available in OpenGL 2.1.

I have created some proof of concept of SDL2 integration with fixed pipeline that may work in such case. Please try running it and tell me if it works. If so then I will try to find a way to nicely integrate this in the project. This is the gist with PoC: https://gist.github.com/swistakm/55af769339ab04f7101e2a8652fe35cb

from pyimgui.

 avatar commented on August 24, 2024

Get Numpy and see if issue still remains, might be worth it just to check.

from pyimgui.

swistakm avatar swistakm commented on August 24, 2024

I'm closing this because there was no follow-up. If anyone will have similar issue feel free to reopen.

from pyimgui.

samkusin avatar samkusin commented on August 24, 2024

I experienced the same issue. In my situation, I noticed my OpenGL version was being reported at 1.1 (which didn't make sense given I was on a GTX 1070 with up to date drivers.)

Also I was using a RDP client for development purposes. Apparently OpenGL and remote desktop via RDP do not work very well together and this is a known issue (DirectX on the other hand is fully supported in RDP.)

Switching to a native/host desktop setup resolved the issue for me, and it works beautifully.

I suppose someone could work on a DX9 port of the renderer for pyimgui. I wish I had more time to do this though.

from pyimgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.