Giter Club home page Giter Club logo

Comments (9)

einarf avatar einarf commented on July 30, 2024

Can you share any code here? I don't even know what you are doing. You are trying to detect a context created by this library? Need a lot more information here.

Are you talking about https://github.com/angeloskath/simple-3dviz ?

from moderngl.

hariharan382 avatar hariharan382 commented on July 30, 2024

from moderngl.

szabolcsdombi avatar szabolcsdombi commented on July 30, 2024

maybe the window does not require a high OpenGL version and the system provides a 3.0.
https://github.com/angeloskath/simple-3dviz/blob/master/simple_3dviz/window/wx.py#L40-L43

from moderngl.

einarf avatar einarf commented on July 30, 2024

Mabe a bug in the simple-3dviz project?

from moderngl.

hariharan382 avatar hariharan382 commented on July 30, 2024

Mabe a bug in the simple-3dviz project?

I need to find light intensity incident on the object, visit possible to compute in simple_3dviz , or any other library

from moderngl.

einarf avatar einarf commented on July 30, 2024

Asking again: Can you create an issue in the simple-3dviz project and link this one?

You are not providing much information here, so I don't think it's possible to progress here. The other project probably have a better idea what the problem is. It's WX creating the context, not moderngl.. so It's not really moderngl related at all.

The problem is that WX doesn't create a context with the right version. That code is not on our side. It could also be a driver issue on your side.

from moderngl.

hariharan382 avatar hariharan382 commented on July 30, 2024

angeloskath/simple-3dviz#1

I tried this solution, but it seems the issue with moderngl....

from moderngl.

szabolcsdombi avatar szabolcsdombi commented on July 30, 2024

it is not really possible as moderngl is not involved in the opengl context creation.

you can simply check the version by placing this code right before the moderngl.create_context call:

from OpenGL import GL; GL.glGetString(GL.GL_VERSION)

you might need to pip install pyopengl for the code above to work

from moderngl.

szabolcsdombi avatar szabolcsdombi commented on July 30, 2024

to understand better the problem you should know that:

  • in order to have OpenGL available to load, there must be a window and opengl context created.
  • when a window is created it must select a pixel format and create an OpenGL context.
  • at this point the OpenGL functions are already tight to a version and driver implementation.

the above happens without moderngl being present

  • moderngl is a library using the OpenGL methods provided by glcontext.
  • glcontext is a very simple module, in your case it just loads the already existing OpenGL methods and pass it to moderngl. (glxGetProcAddr and similar)
  • moderngl calls glGetIntegerv for the major and minor versions and finds 3 and 0 respectively.
  • at this point there is no way to get a higher version by calling any other gl methods.

to fix the issue you should check the gl version with the snippet pasted above right after the window creation and tweak the window creation parameters until you get your 4.6.0 NVIDIA 470.182.03 version reported.

PS: if you use X11 forwarding you might not get it unless setting LIBGL_ALWAYS_INDIRECT properly.

from moderngl.

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.