Re: pyopengl extension detection.

Roman Valov <[email protected]> Sat, 2 Nov 2013 18:11:58 +0400
Newsgroups gmane.comp.python.opengl.devel
Message-ID <CAELN+STZOga8OBvCvH+64qWA7h=FrSuEUGJ84CpA9a4_bFy9Yg@mail.gmail.com>
--===============2737838277798560934==
Content-Type: multipart/alternative; boundary=001a11c3f75e54794c04ea32454e

--001a11c3f75e54794c04ea32454e
Content-Type: text/plain; charset=ISO-8859-1

Ok, Mike.. the actual question to you is in last paragraph.


Here is update with my review of the problem with wglSwapIntervalEXT and
wglGetSwapIntervalEXT.
Seems that problem is driven by two diffrent factors:

1) Wrapper code generator (gengl.py) doesn't set 'extension' parameter for
'createBaseFunction'.

Thus OpenGL/platform/baseplatform.py code tries to load extension functions
from platform.GL library
which actually doesn't have them in common case and as a result I've got
these functions unresolved.

2) BasePlatform.checkExtension code relies only on
glGetString(GL_EXTENSIONS).

I've tested extension WGL_EXT_swap_control on NV and Intel gpu platforms.
In fact only
on NV platform this extension was listed in glGetString(GL_EXTENSIONS)
result. According
to specs:

http://www.opengl.org/registry/specs/EXT/wgl_extensions_string.txt
http://www.opengl.org/registry/specs/ARB/wgl_extensions_string.txt
http://www.opengl.org/wiki/Load_OpenGL_Functions#Platform-specific_Extensions

one would to use wglGetExtensionsStringXXX to check for WGL extensions. On
both platforms I've used
required extension was listed in wglGetGetExtensionsString output. As I see
on GLX there is similar
functionality provided by glXQueryExtensionsString. Which also aren't taken
into account in PyOpenGL.



So, my plan is firstly to fix gengl.py and later add method for
platform-specific extensions check.
But now I'm stuck with gengl.py doesn't produce the same _WGL_NV.py that is
commited to bzr.
Besides header file path in comments (which is minor issue), I see
whitespaces differences and
moreover, in myself-generated _WGL_NV.py there are no 'GLAPI' symbol. Could
you say anything
about that symbol? Was it added by hand or was it included in previous
versions of wglext.h?

Regards, Roman.

--001a11c3f75e54794c04ea32454e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Ok, Mike.. the actual question to you is in last paragraph=
.<div><br></div><div><br><div>Here is update with my review of the problem =
with wglSwapIntervalEXT and wglGetSwapIntervalEXT.</div><div>Seems that pro=
blem is driven by two diffrent factors:</div>

<div><br></div><div>1) Wrapper code generator (gengl.py) doesn&#39;t set &#=
39;extension&#39; parameter for &#39;createBaseFunction&#39;.</div><div><br=
></div><div>Thus OpenGL/platform/baseplatform.py code tries to load extensi=
on functions from platform.GL library</div>

<div>which actually doesn&#39;t have them in common case and as a result I&=
#39;ve got these functions unresolved.</div><div><br></div><div>2) BasePlat=
form.checkExtension code relies only on glGetString(GL_EXTENSIONS).</div>

<div><br></div><div>I&#39;ve tested extension WGL_EXT_swap_control on NV an=
d Intel gpu platforms. In fact only</div><div>on NV platform this extension=
 was listed in glGetString(GL_EXTENSIONS) result. According</div><div>
to specs:</div>
<div><br></div><div><a href=3D"http://www.opengl.org/registry/specs/EXT/wgl=
_extensions_string.txt">http://www.opengl.org/registry/specs/EXT/wgl_extens=
ions_string.txt</a><br></div><div><a href=3D"http://www.opengl.org/registry=
/specs/ARB/wgl_extensions_string.txt">http://www.opengl.org/registry/specs/=
ARB/wgl_extensions_string.txt</a><br>

</div><div><a href=3D"http://www.opengl.org/wiki/Load_OpenGL_Functions#Plat=
form-specific_Extensions">http://www.opengl.org/wiki/Load_OpenGL_Functions#=
Platform-specific_Extensions</a></div><div><br></div><div>one would to use =
wglGetExtensionsStringXXX to check for WGL extensions. On both platforms I&=
#39;ve used</div>

<div>required extension was listed in wglGetGetExtensionsString output. As =
I see on GLX there is similar</div><div>functionality provided by glXQueryE=
xtensionsString. Which also aren&#39;t taken into account in PyOpenGL.</div=
>

<div><br></div><div><br></div><div><br></div><div>So, my plan is firstly to=
 fix gengl.py and later add method for platform-specific extensions check.<=
/div><div>But now I&#39;m stuck with gengl.py doesn&#39;t produce the same =
_WGL_NV.py that is commited to bzr.</div>

<div>Besides header file path in comments (which is minor issue), I see whi=
tespaces differences and</div><div>moreover, in myself-generated _WGL_NV.py=
 there are no &#39;GLAPI&#39; symbol. Could you say anything</div><div>

about that symbol? Was it added by hand or was it included in previous vers=
ions of wglext.h?</div><div><br></div><div>Regards, Roman.</div><div><br></=
div></div><div class=3D"gmail_extra"><br></div></div>

--001a11c3f75e54794c04ea32454e--


--===============2737838277798560934==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
--===============2737838277798560934==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-devel

--===============2737838277798560934==--