Raw generator and performance

"Fabian Binz" <[email protected]> Fri, 24 Aug 2012 14:07:58 +0200
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <000001cd81f1$19f0df10$4dd29d30$@de>
This is a multi-part message in MIME format.

--===============9022563721344412848==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0001_01CD8201.DD79AF10"
Content-Language: de

This is a multi-part message in MIME format.

------=_NextPart_000_0001_01CD8201.DD79AF10
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi list,

 

I have two questions: 

 

1. What is holding the release of OpenGLRawGen (see [1]) back? I tried it
and it works quite well, although there seems to be a problem with at least
some functions: glGenVertexArrays and the related functions are not exported
by any core module, although it's part of the core since OpenGL 3.0. I tried
to find the source of this error in the code, but the codebase is quite big
and I still don't know where things go wrong.

 

2. Looking at the source of HSOpenGLRaw.c it seems to be quite costly to
call OpenGL functions, because every time the function pointer has to be
retrieved. Or does GetProcAdress (or the equivalent on Mac and Linux) cache
previous results? Other librarys (like GLEW or gl3w for C) load the
functions pointers once at initialization (which has of course to be done
explicitly unlike in HOpenGL), which I guess is for efficiency reasons.

 

[1] http://www.haskell.org/pipermail/hopengl/2012-January/001073.html


------=_NextPart_000_0001_01CD8201.DD79AF10
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Vorformatiert Zchn";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.HTMLVorformatiertZchn
	{mso-style-name:"HTML Vorformatiert Zchn";
	mso-style-priority:99;
	mso-style-link:"HTML Vorformatiert";
	font-family:"Courier New";}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 @list l0
	{mso-list-id:1683434490;
	mso-list-type:hybrid;
	mso-list-template-ids:-1024698442 67567631 67567641 67567643 67567631 =
67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DDE link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<p class=3DMsoNormal><span lang=3DEN-US>Hi list,<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>I have two questions: =
<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>1. What is holding the release =
of
OpenGLRawGen (see [1]) back? I tried it and it works quite well, =
although there
seems to be a problem with at least some functions: glGenVertexArrays =
and the
related functions are not exported by any core module, although =
it&#8217;s part
of the core since OpenGL 3.0. I tried to find the source of this error =
in the
code, but the codebase is quite big and I still don&#8217;t know where =
things
go wrong.<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>2. Looking at the source of =
HSOpenGLRaw.c it
seems to be quite costly to call OpenGL functions, because every time =
the
function pointer has to be retrieved. Or does GetProcAdress (or the =
equivalent
on Mac and Linux) cache previous results? Other librarys (like GLEW or =
gl3w for
C) load the functions pointers once at initialization (which has of =
course to
be done explicitly unlike in HOpenGL), which I guess is for efficiency =
reasons.<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>[1] <a
href=3D"http://www.haskell.org/pipermail/hopengl/2012-January/001073.html=
">http://www.haskell.org/pipermail/hopengl/2012-January/001073.html</a><o=
:p></o:p></span></p>

</div>

</body>

</html>

------=_NextPart_000_0001_01CD8201.DD79AF10--



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

_______________________________________________
HOpenGL mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hopengl

--===============9022563721344412848==--