<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for allanpetersen.com</title>
	<atom:link href="http://allanpetersen.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://allanpetersen.com</link>
	<description>my home on the big web</description>
	<lastBuildDate>Fri, 16 Dec 2011 08:55:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on TOpenGLAPPanel for XE2 by Allan</title>
		<link>http://allanpetersen.com/2011/11/topenglappanel-for-xe2/comment-page-1/#comment-205</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Fri, 16 Dec 2011 08:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=240#comment-205</guid>
		<description>It is already available under downloads

http://allanpetersen.com/downloads/</description>
		<content:encoded><![CDATA[<p>It is already available under downloads</p>
<p><a href="http://allanpetersen.com/downloads/" rel="nofollow">http://allanpetersen.com/downloads/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TOpenGLAPPanel for XE2 by Pawel</title>
		<link>http://allanpetersen.com/2011/11/topenglappanel-for-xe2/comment-page-1/#comment-204</link>
		<dc:creator>Pawel</dc:creator>
		<pubDate>Fri, 16 Dec 2011 03:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=240#comment-204</guid>
		<description>I would be very happy to have this comopnent on C++B XE. I got used to use it!</description>
		<content:encoded><![CDATA[<p>I would be very happy to have this comopnent on C++B XE. I got used to use it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Demo of OpenGL Text 2D/3D by Hans</title>
		<link>http://allanpetersen.com/2010/03/demo-of-opengl-text-2d3d/comment-page-1/#comment-150</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Fri, 02 Sep 2011 16:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=134#comment-150</guid>
		<description>Hello! I have just downloaded the clock exemple and run it with the panel. Very good,indeed, but somewhat ´difficult for someone who is just begining OpenGL. I have tried to run simple console apps without success - I think it is there I must begin, I am totally new to OGL. Do You know anyplace I can find very simple exemples for RAD Studio console programs - I have problems with linking (aux etc). Greetings hans</description>
		<content:encoded><![CDATA[<p>Hello! I have just downloaded the clock exemple and run it with the panel. Very good,indeed, but somewhat ´difficult for someone who is just begining OpenGL. I have tried to run simple console apps without success &#8211; I think it is there I must begin, I am totally new to OGL. Do You know anyplace I can find very simple exemples for RAD Studio console programs &#8211; I have problems with linking (aux etc). Greetings hans</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VCL Component (TOpenGLAPPanel) by TzuYuan Lin</title>
		<link>http://allanpetersen.com/2010/10/vcl-component-topenglappanel-2/comment-page-1/#comment-109</link>
		<dc:creator>TzuYuan Lin</dc:creator>
		<pubDate>Sat, 12 Mar 2011 13:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=198#comment-109</guid>
		<description>I&#039;m appreciate your components.
Thanks for your sharing.
Good job!</description>
		<content:encoded><![CDATA[<p>I&#8217;m appreciate your components.<br />
Thanks for your sharing.<br />
Good job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on FBO and Bitmap Layer Demo by Allan</title>
		<link>http://allanpetersen.com/2010/04/fbo-and-bitmap-layer-demo/comment-page-1/#comment-101</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Thu, 27 Jan 2011 20:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=155#comment-101</guid>
		<description>Thanks...</description>
		<content:encoded><![CDATA[<p>Thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on FBO and Bitmap Layer Demo by Lauren</title>
		<link>http://allanpetersen.com/2010/04/fbo-and-bitmap-layer-demo/comment-page-1/#comment-99</link>
		<dc:creator>Lauren</dc:creator>
		<pubDate>Sun, 23 Jan 2011 19:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=155#comment-99</guid>
		<description>Epic, this was *exactly* what I needed :D Pretty much everywhere I looked, people were saying that this effect isn&#039;t possible with OpenGL and to use DirectX, which isn&#039;t really an option when developing cross-platform. Again, absolutely epic - cheers!</description>
		<content:encoded><![CDATA[<p>Epic, this was *exactly* what I needed <img src='http://allanpetersen.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Pretty much everywhere I looked, people were saying that this effect isn&#8217;t possible with OpenGL and to use DirectX, which isn&#8217;t really an option when developing cross-platform. Again, absolutely epic &#8211; cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VCL Component (TOpenGLAPPanel) by Allan</title>
		<link>http://allanpetersen.com/2010/06/vcl-component-topenglappanel/comment-page-1/#comment-52</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Sat, 25 Sep 2010 08:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=182#comment-52</guid>
		<description>Here is a clue....:-)


//---- begin
	// Get client geometry
	int            ii, Bytes, bb;
	SIZE           glsize;
	unsigned char *pPixelData;

	OpenGLPanel-&gt;MakeOpenGLPanelCurrent();
	ClearSelection ();
	Redraw ();

	glsize.cx = OpenGLPanel-&gt;ClientWidth;
	glsize.cy = OpenGLPanel-&gt;ClientHeight;


    // ---- Lines have to be 32 bytes aligned, suppose 24 bits per pixel
    // ---- just cropped it
    glsize.cx -= glsize.cx % 4;

    // ---- Create a bitmap and select it in the device context
    // ---- Note that this will never be used ;-) but no matter

    // ---- Alloc pixel bytes
    Bytes = 3 * glsize.cx * glsize.cy;
    pPixelData = new  unsigned char [Bytes];

    // ---- Copy from OpenGL
    glReadPixels (0,0,glsize.cx,glsize.cy, GL_RGB, GL_UNSIGNED_BYTE, pPixelData);

    // ---- Pixel data is stored as GRB, not RGB
    for (ii=0; ii&lt;Bytes; ii+=3) {
        bb               = pPixelData[ii+1];
        pPixelData[ii+1] = pPixelData[ii];
        pPixelData[ii]   = bb;
        }

    // ---- Fill header
    // --- BITMAPINFOHEADER header;
    BITMAPINFO header;

    header.bmiHeader.biWidth = glsize.cx;
    header.bmiHeader.biHeight = glsize.cy;
    header.bmiHeader.biSizeImage = Bytes;
    header.bmiHeader.biSize = 40;
    header.bmiHeader.biPlanes = 1;
    header.bmiHeader.biBitCount =  24; // RGB
	header.bmiHeader.biCompression = 0;
    header.bmiHeader.biXPelsPerMeter = 0;
    header.bmiHeader.biYPelsPerMeter = 0;
    header.bmiHeader.biClrUsed = 0;
    header.bmiHeader.biClrImportant = 0;

	// ---- Generate handle
	HANDLE handle = (HANDLE)GlobalAlloc (GHND,sizeof(BITMAPINFO) + Bytes);
	if (handle != NULL) {
		// Lock handle
		char *pData = (char *) ::GlobalLock((HGLOBAL)handle);
		// Copy header and data
		memcpy(pData,&amp;header,sizeof(BITMAPINFO));
		memcpy(pData+sizeof(BITMAPINFO),pPixelData,Bytes);
		// Unlock
		GlobalUnlock((HGLOBAL)handle);

		// Push DIB in clipboard
		OpenClipboard(OpenGLPanel-&gt;Handle);
		EmptyClipboard();
		SetClipboardData(CF_DIB, handle);
		CloseClipboard();
		}

	delete [] pPixelData;
// ---- End</description>
		<content:encoded><![CDATA[<p>Here is a clue&#8230;.:-)</p>
<p>//&#8212;- begin<br />
	// Get client geometry<br />
	int            ii, Bytes, bb;<br />
	SIZE           glsize;<br />
	unsigned char *pPixelData;</p>
<p>	OpenGLPanel->MakeOpenGLPanelCurrent();<br />
	ClearSelection ();<br />
	Redraw ();</p>
<p>	glsize.cx = OpenGLPanel->ClientWidth;<br />
	glsize.cy = OpenGLPanel->ClientHeight;</p>
<p>    // &#8212;- Lines have to be 32 bytes aligned, suppose 24 bits per pixel<br />
    // &#8212;- just cropped it<br />
    glsize.cx -= glsize.cx % 4;</p>
<p>    // &#8212;- Create a bitmap and select it in the device context<br />
    // &#8212;- Note that this will never be used <img src='http://allanpetersen.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  but no matter</p>
<p>    // &#8212;- Alloc pixel bytes<br />
    Bytes = 3 * glsize.cx * glsize.cy;<br />
    pPixelData = new  unsigned char [Bytes];</p>
<p>    // &#8212;- Copy from OpenGL<br />
    glReadPixels (0,0,glsize.cx,glsize.cy, GL_RGB, GL_UNSIGNED_BYTE, pPixelData);</p>
<p>    // &#8212;- Pixel data is stored as GRB, not RGB<br />
    for (ii=0; ii<bytes ; ii+=3) {<br />
        bb               = pPixelData[ii+1];<br />
        pPixelData[ii+1] = pPixelData[ii];<br />
        pPixelData[ii]   = bb;<br />
        }</p>
<p>    // ---- Fill header<br />
    // --- BITMAPINFOHEADER header;<br />
    BITMAPINFO header;</p>
<p>    header.bmiHeader.biWidth = glsize.cx;<br />
    header.bmiHeader.biHeight = glsize.cy;<br />
    header.bmiHeader.biSizeImage = Bytes;<br />
    header.bmiHeader.biSize = 40;<br />
    header.bmiHeader.biPlanes = 1;<br />
    header.bmiHeader.biBitCount =  24; // RGB<br />
	header.bmiHeader.biCompression = 0;<br />
    header.bmiHeader.biXPelsPerMeter = 0;<br />
    header.bmiHeader.biYPelsPerMeter = 0;<br />
    header.bmiHeader.biClrUsed = 0;<br />
    header.bmiHeader.biClrImportant = 0;</p>
<p>	// ---- Generate handle<br />
	HANDLE handle = (HANDLE)GlobalAlloc (GHND,sizeof(BITMAPINFO) + Bytes);<br />
	if (handle != NULL) {<br />
		// Lock handle<br />
		char *pData = (char *) ::GlobalLock((HGLOBAL)handle);<br />
		// Copy header and data<br />
		memcpy(pData,&#038;header,sizeof(BITMAPINFO));<br />
		memcpy(pData+sizeof(BITMAPINFO),pPixelData,Bytes);<br />
		// Unlock<br />
		GlobalUnlock((HGLOBAL)handle);</p>
<p>		// Push DIB in clipboard<br />
		OpenClipboard(OpenGLPanel->Handle);<br />
		EmptyClipboard();<br />
		SetClipboardData(CF_DIB, handle);<br />
		CloseClipboard();<br />
		}</p>
<p>	delete [] pPixelData;<br />
// &#8212;- End</bytes></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VCL Component (TOpenGLAPPanel) by Phil</title>
		<link>http://allanpetersen.com/2010/06/vcl-component-topenglappanel/comment-page-1/#comment-51</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Fri, 24 Sep 2010 22:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=182#comment-51</guid>
		<description>Hi

All working very well.  I would appreciate any clues regarding copying my OpenGLAPP image to clipboard please.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>All working very well.  I would appreciate any clues regarding copying my OpenGLAPP image to clipboard please.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VCL Component (TOpenGLAPPanel) by Allan</title>
		<link>http://allanpetersen.com/2010/06/vcl-component-topenglappanel/comment-page-1/#comment-48</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Fri, 27 Aug 2010 22:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=182#comment-48</guid>
		<description>Builder is including the headers to make sure no compiler errors occur when we compile.
unfortunally it is not very good to remove them when we delete a component again.

for repeated calls, headers normally include defines like

#ifndef TOpenGLAPPanelH
#define TOpenGLAPPanelH
... code
#endif

this ensures only one interpretation of the linker.</description>
		<content:encoded><![CDATA[<p>Builder is including the headers to make sure no compiler errors occur when we compile.<br />
unfortunally it is not very good to remove them when we delete a component again.</p>
<p>for repeated calls, headers normally include defines like</p>
<p>#ifndef TOpenGLAPPanelH<br />
#define TOpenGLAPPanelH<br />
&#8230; code<br />
#endif</p>
<p>this ensures only one interpretation of the linker.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VCL Component (TOpenGLAPPanel) by Phil</title>
		<link>http://allanpetersen.com/2010/06/vcl-component-topenglappanel/comment-page-1/#comment-47</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Thu, 26 Aug 2010 11:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://allanpetersen.com/?p=182#comment-47</guid>
		<description>Hi
OpenGLAP working well so far but my new installation of Builder2010 forces certain include files to appear in the header files of units containing forms, and forces #include &quot;TOpenGLAPPanel.h&quot; to appear before pragma hdrstop in the main unit, although it is already called in a subsequent header file (I have them daisychained to minimise repeated calls). Can anyone explain the logic behind this and whether it should be a problem. 

I am also getting Linker warnings &quot;Public symbol -gtd appearing in both module... and module..., and similarly for _dfb and _m but I think this is a legacy problem.</description>
		<content:encoded><![CDATA[<p>Hi<br />
OpenGLAP working well so far but my new installation of Builder2010 forces certain include files to appear in the header files of units containing forms, and forces #include &#8220;TOpenGLAPPanel.h&#8221; to appear before pragma hdrstop in the main unit, although it is already called in a subsequent header file (I have them daisychained to minimise repeated calls). Can anyone explain the logic behind this and whether it should be a problem. </p>
<p>I am also getting Linker warnings &#8220;Public symbol -gtd appearing in both module&#8230; and module&#8230;, and similarly for _dfb and _m but I think this is a legacy problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

