Hi Johan, I'm glad you were able to get the bindings to complete. If you
don't mind, can you share your changes to the build scripts? Either by
pasting here, or a pull request on Bitbucket.
Also, I completely forgot to ask if you're creating a higher level OpenGL
context. If not, this can be done by:
>>> import pyglet
>>> config = pyglet.gl.Config(major_version=4, minor_version=3)
>>> window = pyglet.window.Window(config=config, visible=False)
>>> print('OpenGL version:', window.context.get_info().get_version())
OpenGL version: 4.3 (Core Profile) Mesa 17.1.1
I'm not familiar with this extensions myself, but a good start might be
finding a bit of example C/C++ code that illustrates the usage.
You can also have a look at your new gl bindings, and try to find the
corresponding code for this extension, just to be sure it's being wrapped
correctly.
On Wednesday, June 7, 2017 at 11:57:52 PM UTC+9, Johan Forsberg wrote:
>
> Thanks, somehow I failed to look through the documentation :(
>
> Anyway, I managed to run the scripts under py2.7 as described (after
> updating the URLs) but it did not help with my problem. I then started
> wondering about how the GL extensions work; the
> GL_ARB_texture_buffer_object extension I believe I need is listed under
> "OpenGL core profile extensions" but not under "OpenGL extensions" in the
> glxinfo output, I guess there is a difference there..?
>
> /Johan
>
> On Thursday, 1 June 2017 04:12:43 UTC+2, Benjamin Moran wrote:
>>
>> Hi Johan,
>>
>> Ah, that's a good catch. There is a section in the documentation that
>> goes over generating the bindings:
>>
>> http://pyglet.readthedocs.io/en/latest/internal/generated.html#generating-gl-wrappers
>> I think I just spotted some typos: glext_abi and glxext_abi should be
>> _arb, not _abi
>>
>> One thing to be careful of is that the resulting binding files have start
>> and end markers in them, so the entire files are not re-written. If the
>> wrapping crashes you might end up with broken binding files, so It's good
>> to start with a fresh copy of the gl directory each time.
>>
>> I had a short look at the newest Ply, and it seems like the API has
>> changed a little bit. The Parser class has been renamed to LRParser, for
>> example. I think it will just require sitting down and reworking a bit of
>> the wrapping code. The entire thing is long in need of a cleanup, really.
>> If you're hacking on this, let us know how it goes!
>>
>>
>> On Thursday, June 1, 2017 at 6:41:00 AM UTC+9, Johan Forsberg wrote:
>>>
>>> Hi Ben!
>>>
>>> Thanks for your reply, this makes sense as buffer textures seems to be a
>>> relatively recent thing.
>>>
>>> I had a quick look at the stuff in tools, and tried running "python
>>> gengl.py glext_arb". It seems that the
>>> parsing errors are due to some urls in the script being outdated so it
>>> tries to parse the HTML error
>>> page :P
>>>
>>> I changed to these URLs:
>>> GLEXT_ABI_H = 'https://www.khronos.org/registry/OpenGL/api/GL/glext.h'
>>> GLXEXT_ABI_H = 'https://www.khronos.org/registry/OpenGL/api/GL/glxext.h'
>>> WGLEXT_ABI_H = 'https://www.khronos.org/registry/OpenGL/api/GL/wglext.h'
>>>
>>> After that the script passes fine. But there are other problems, most
>>> obviously the scripts are not python3
>>> compatible and neither is their output. The first is probably not too
>>> hard to fix with 2to3 or something. And
>>> ply seems to be python 3 compatible now.
>>>
>>> I'm pretty much a noob when it comes to low level GL stuff though. Is
>>> there some documentation on what
>>> scripts needs to be run in order to completely update the bindings?
>>>
>>> /Johan
>>>
>>> On Wednesday, 31 May 2017 06:15:40 UTC+2, Benjamin Moran wrote:
>>>>
>>>> Hi Johan,
>>>>
>>>> This might be because the GL bindings are a little behind. These
>>>> extensions may not be fully wrapped.
>>>> The bindings for pyglet should be regenerated from the header files
>>>> every so often, but unfortunately
>>>> the pyglet wrapping tools themselves are in need of an update. (These
>>>> are located in /pyglet/tools/).
>>>> When I tried running them recently, they complained about some of the
>>>> syntax in the latest GL header files.
>>>>
>>>> I was planning on reviewing/updating these tools at some point in the
>>>> future. It hasn't been a priority since the
>>>> core pyglet modules are not using for any recent extensions, but it
>>>> definitely needs to be done.
>>>>
>>>> Pyglet's wrapping tools are based on lex/yacc from the Ply project. If
>>>> anyone is interested in helping out with
>>>> modernizing them, please get in touch or comment here.
>>>>
>>>> -Ben
>>>>
>>>>
>>>>
>>>>
>>>> On Wednesday, May 31, 2017 at 5:06:32 AM UTC+9, Johan Forsberg wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm trying to use buffer textures to transfer 1d data to shaders, but
>>>>> I'm running into problems. I think my issue is with the
>>>>> "GL_ARB_texture_buffer_object" extension which appears to be necessary (
>>>>> https://www.khronos.org/opengl/wiki/Buffer_Texture).
>>>>>
>>>>> "glxinfo" reports that it's supported, and I see that it's defined in
>>>>> "pyglet/gl/glext_arb.py", but still
>>>>> 'gl.gl_info.have_extension("GL_ARB_texture_buffer_object")' reports
>>>>> False.
>>>>> Am I looking in the right places?
>>>>>
>>>>> This is on Ubuntu, using intel graphics, with python 3.6 and pyglet
>>>>> installed from bitbucket (updated today). I have the same issue with
>>>>> pyglet
>>>>> 1.2.4.
>>>>>
>>>>> Thanks!
>>>>> /Johan
>>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.