<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[城市流浪猫]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[改变自己，改变世界！]]></description>
<link>http://hi.baidu.com/csllm</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[鱼眼照片全景拼接技术（1）]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/1bfe0d46e26a69036b63e5d1.html]]></link>
        <description><![CDATA[
		
		<p><span>看出来了吗？ 下面图中上下两行图片的关系？</span></p>
<p><span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/csllm/pic/item/4f1bbe383be0c8edd4622571.jpg"></span></p>
<p> </p>
<p><span>再来一张，这张去掉了更多的干扰，拼接效果比较理想，不过也去掉了太多信息。</span></p>
<p><span><br>
<span><img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/csllm/pic/item/ed2506e9a1b1a610b90e2d71.jpg"><br>
</span></span></p>
<p><span><span>是的，正如你所看到的，上面一行照片是下面照片的裁剪拼接合成的，如果你细细观察，还会发现其实左右两个边线也是可以拼接起来的，如果卷成个圆桶会是什么样呢？</span></span></p>
<p><span><span>先说到这儿，下回继续分解。</span></span></p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/1bfe0d46e26a69036b63e5d1.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月29日 星期日  06:45</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/1bfe0d46e26a69036b63e5d1.html</guid>
</item>

<item>
        <title><![CDATA[重新开放]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/f0da71c6ff8319119d163dc8.html]]></link>
        <description><![CDATA[
		
		<p>哎，杯具呀，找了国内各大博客网站，居然没有找到合适的博客站……国外的喜欢的又要被水产，想过用Appspot搭一个，但是也要被水产，没办法啊，伟大的天朝，渺小的Google……</p>
<p>换工作的事真让我头疼，呵呵，有些迷茫，有些思考让我更迷茫，现在我要做的也许只是下一个决定，不管走哪条路。面对迷雾，你有什么办法，不好使，重要的就是走出第一步，然后一步一步的走出去，总有明媚的阳光在迷雾之外。</p>
<p>重新开博，今后准备写些专业一些的技术文章，打造自己的影响力，说我功利也好，说我不行也行，无所谓，反正了解我的人都知道我根本不在乎这些。不过第一篇，呵呵就这么浪费了……</p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/f0da71c6ff8319119d163dc8.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月29日 星期日  05:02</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/f0da71c6ff8319119d163dc8.html</guid>
</item>

<item>
        <title><![CDATA[复习openGL 画个三角形，用键盘控制旋转]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/239c8526141ed61d8b82a147.html]]></link>
        <description><![CDATA[
		
		<font face="monospace"> <font color="#ffff00"><strong><font color="#000000">不算重新开博……临时发的……<br>
用了Alpha混合，透视投影，旋转变换，＋简单的键盘控制<br>
</font> <br>
1 </strong></font><font color="#8080ff"><strong>#include </strong></font><font color="#ff40ff"><strong>&lt;stdio.h&gt;</strong></font><br>
<font color="#ffff00"><strong>&#160;&#160;2 </strong></font><font color="#8080ff"><strong>#include </strong></font><font color="#ff40ff"><strong>&lt;math.h&gt;</strong></font><br>
<font color="#ffff00"><strong>&#160;&#160;3 </strong></font><font color="#8080ff"><strong>#include </strong></font><font color="#ff40ff"><strong>&lt;GL/glut.h&gt;</strong></font><br>
<font color="#ffff00"><strong>&#160;&#160;4 </strong></font><br>
<font color="#ffff00"><strong>&#160;&#160;5 </strong></font>GLint keytable[<font color="#ff40ff"><strong>128</strong></font>] = {<font color="#ff40ff"><strong>0</strong></font>};<br>
<font color="#ffff00"><strong>&#160;&#160;6 </strong></font><br>
<font color="#ffff00"><strong>&#160;&#160;7 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;resize(<font color="#00ff00"><strong>int</strong></font>&#160;w, <font color="#00ff00"><strong>int</strong></font>&#160;h);<br>
<font color="#ffff00"><strong>&#160;&#160;8 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onkey(<font color="#00ff00"><strong>unsigned</strong></font>&#160;<font color="#00ff00"><strong>char</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y);<br>
<font color="#ffff00"><strong>&#160;&#160;9 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onkeyup(<font color="#00ff00"><strong>unsigned</strong></font>&#160;<font color="#00ff00"><strong>char</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y);<br>
<font color="#ffff00"><strong>&#160;10 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onspeckey(<font color="#00ff00"><strong>int</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y);<br>
<font color="#ffff00"><strong>&#160;11 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onspeckeyup(<font color="#00ff00"><strong>int</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y);<br>
<font color="#ffff00"><strong>&#160;12 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;draw();<br>
<font color="#ffff00"><strong>&#160;13 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;ontimer(<font color="#00ff00"><strong>int</strong></font>&#160;timer);<br>
<font color="#ffff00"><strong>&#160;14 </strong></font><br>
<font color="#ffff00"><strong>&#160;15 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;fire_key_event(<font color="#00ff00"><strong>int</strong></font>&#160;key);<br>
<font color="#ffff00"><strong>&#160;16 </strong></font><br>
<font color="#ffff00"><strong>&#160;17 </strong></font>GLdouble rotate = <font color="#ff40ff"><strong>0.0</strong></font>;<br>
<font color="#ffff00"><strong>&#160;18 </strong></font>GLdouble rotate2 = <font color="#ff40ff"><strong>10.0</strong></font>;<br>
<font color="#ffff00"><strong>&#160;19 </strong></font><br>
<font color="#ffff00"><strong>&#160;20 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>&#160;21 </strong></font><font color="#00ffff"><strong>&#160;* the enterance of the application</strong></font><br>
<font color="#ffff00"><strong>&#160;22 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;23 </strong></font><font color="#00ff00"><strong>int</strong></font>&#160;main(<font color="#00ff00"><strong>int</strong></font>&#160;argc, <font color="#00ff00"><strong>char</strong></font>** argv)<br>
<font color="#ffff00"><strong>&#160;24 </strong></font>{<br>
<font color="#ffff00"><strong>&#160;25 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;initialize glut </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;26 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutInit(&amp;argc, argv);<br>
<font color="#ffff00"><strong>&#160;27 </strong></font><br>
<font color="#ffff00"><strong>&#160;28 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;initialize the window </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;29 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutInitWindowPosition(<font color="#ff40ff"><strong>200</strong></font>, <font color="#ff40ff"><strong>100</strong></font>);<br>
<font color="#ffff00"><strong>&#160;30 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutInitWindowSize(<font color="#ff40ff"><strong>800</strong></font>, <font color="#ff40ff"><strong>600</strong></font>);<br>
<font color="#ffff00"><strong>&#160;31 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutCreateWindow(<font color="#ff40ff"><strong>&quot;sence editor&quot;</strong></font>);<br>
<font color="#ffff00"><strong>&#160;32 </strong></font><br>
<font color="#ffff00"><strong>&#160;33 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;initialize display mode</strong></font><br>
<font color="#ffff00"><strong>&#160;34 </strong></font><font color="#00ffff"><strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; we use DOUBLE BUFFERS, DEPTH, RGBA colors </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;35 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutInitDisplayMode(GLUT_DOUBLE | GL_DEPTH | GL_RGBA);<br>
<font color="#ffff00"><strong>&#160;36 </strong></font><br>
<font color="#ffff00"><strong>&#160;37 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;enable blend </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;38 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glEnable(GL_BLEND);<br>
<font color="#ffff00"><strong>&#160;39 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glDisable(GL_DEPTH_TEST);<br>
<font color="#ffff00"><strong>&#160;40 </strong></font><br>
<font color="#ffff00"><strong>&#160;41 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glBlendFunc(GL_SRC_ALPHA, GL_ONE);<br>
<font color="#ffff00"><strong>&#160;42 </strong></font><br>
<font color="#ffff00"><strong>&#160;43 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;handle events </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;44 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutDisplayFunc(draw);<br>
<font color="#ffff00"><strong>&#160;45 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutReshapeFunc(resize);<br>
<font color="#ffff00"><strong>&#160;46 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutKeyboardFunc(onkey);<br>
<font color="#ffff00"><strong>&#160;47 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutKeyboardUpFunc(onkeyup);<br>
<font color="#ffff00"><strong>&#160;48 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutSpecialFunc(onspeckey);<br>
<font color="#ffff00"><strong>&#160;49 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutSpecialUpFunc(onspeckeyup);<br>
<font color="#ffff00"><strong>&#160;50 </strong></font><br>
<font color="#ffff00"><strong>&#160;51 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;main loop </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;52 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutTimerFunc(<font color="#ff40ff"><strong>10</strong></font>, ontimer, <font color="#ff40ff"><strong>1</strong></font>); <br>
<font color="#ffff00"><strong>&#160;53 </strong></font><br>
<font color="#ffff00"><strong>&#160;54 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;glut main loop </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;55 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutMainLoop();<br>
<font color="#ffff00"><strong>&#160;56 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br>
<font color="#ffff00"><strong>&#160;57 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>return</strong></font>&#160;<font color="#ff40ff"><strong>0</strong></font>;<br>
<font color="#ffff00"><strong>&#160;58 </strong></font>}<br>
<font color="#ffff00"><strong>&#160;59 </strong></font><br>
<font color="#ffff00"><strong>&#160;60 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>&#160;61 </strong></font><font color="#00ffff"><strong>&#160;* the application's main loop</strong></font><br>
<font color="#ffff00"><strong>&#160;62 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;63 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;ontimer(<font color="#00ff00"><strong>int</strong></font>&#160;timer)<br>
<font color="#ffff00"><strong>&#160;64 </strong></font>{<br>
<font color="#ffff00"><strong>&#160;65 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;key_rotate();<br>
<font color="#ffff00"><strong>&#160;66 </strong></font><br>
<font color="#ffff00"><strong>&#160;67 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutPostRedisplay();<br>
<font color="#ffff00"><strong>&#160;68 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutTimerFunc(<font color="#ff40ff"><strong>10</strong></font>, ontimer, <font color="#ff40ff"><strong>1</strong></font>);<br>
<font color="#ffff00"><strong>&#160;69 </strong></font>}<br>
<font color="#ffff00"><strong>&#160;70 </strong></font><br>
<font color="#ffff00"><strong>&#160;71 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>&#160;72 </strong></font><font color="#00ffff"><strong>&#160;* paint the sence</strong></font><br>
<font color="#ffff00"><strong>&#160;73 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;74 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;draw()<br>
<font color="#ffff00"><strong>&#160;75 </strong></font>{<br>
<font color="#ffff00"><strong>&#160;76 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;clear the sence </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;77 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glClearColor(<font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>);<br>
<font color="#ffff00"><strong>&#160;78 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);<br>
<font color="#ffff00"><strong>&#160;79 </strong></font><br>
<font color="#ffff00"><strong>&#160;80 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glLoadIdentity();<br>
<font color="#ffff00"><strong>&#160;81 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glRotated(rotate, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>); <br>
<font color="#ffff00"><strong>&#160;82 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br>
<font color="#ffff00"><strong>&#160;83 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glPushMatrix();<br>
<font color="#ffff00"><strong>&#160;84 </strong></font><br>
<font color="#ffff00"><strong>&#160;85 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;GLint i;<br>
<font color="#ffff00"><strong>&#160;86 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>for</strong></font>&#160;(i = <font color="#ff40ff"><strong>0</strong></font>; i &lt; <font color="#ff40ff"><strong>10</strong></font>; i++) {<br>
<font color="#ffff00"><strong>&#160;87 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glRotated(rotate2, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>); <br>
<font color="#ffff00"><strong>&#160;88 </strong></font><br>
<font color="#ffff00"><strong>&#160;89 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;paint a triangle </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>&#160;90 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glBegin(GL_TRIANGLE_STRIP);<br>
<font color="#ffff00"><strong>&#160;91 </strong></font><br>
<font color="#ffff00"><strong>&#160;92 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glColor4d(<font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.2</strong></font>);<br>
<font color="#ffff00"><strong>&#160;93 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glVertex3d(<font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>, -<font color="#ff40ff"><strong>1.0</strong></font>&#160;* i);<br>
<font color="#ffff00"><strong>&#160;94 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br>
<font color="#ffff00"><strong>&#160;95 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glColor4d(<font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.2</strong></font>);<br>
<font color="#ffff00"><strong>&#160;96 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glVertex3d(-<font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, -<font color="#ff40ff"><strong>1.0</strong></font>&#160;* i);<br>
<font color="#ffff00"><strong>&#160;97 </strong></font><br>
<font color="#ffff00"><strong>&#160;98 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glColor4d(<font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, <font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>0.2</strong></font>);<br>
<font color="#ffff00"><strong>&#160;99 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glVertex3d(<font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>0.0</strong></font>, -<font color="#ff40ff"><strong>1.0</strong></font>&#160;* i);<br>
<font color="#ffff00"><strong>100 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br>
<font color="#ffff00"><strong>101 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glEnd();<br>
<font color="#ffff00"><strong>102 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br>
<font color="#ffff00"><strong>103 </strong></font><br>
<font color="#ffff00"><strong>104 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glPopMatrix();<br>
<font color="#ffff00"><strong>105 </strong></font><br>
<font color="#ffff00"><strong>106 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;flush and swap the buffers </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>107 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glFlush();<br>
<font color="#ffff00"><strong>108 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glutSwapBuffers();<br>
<font color="#ffff00"><strong>109 </strong></font>}<br>
<font color="#ffff00"><strong>110 </strong></font><br>
<font color="#ffff00"><strong>111 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>112 </strong></font><font color="#00ffff"><strong>&#160;* handle the window resized event</strong></font><br>
<font color="#ffff00"><strong>113 </strong></font><font color="#00ffff"><strong>&#160;* we reset the viewport settings and projection matrix</strong></font><br>
<font color="#ffff00"><strong>114 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>115 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;resize(<font color="#00ff00"><strong>int</strong></font>&#160;w, <font color="#00ff00"><strong>int</strong></font>&#160;h)<br>
<font color="#ffff00"><strong>116 </strong></font>{<br>
<font color="#ffff00"><strong>117 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glViewport(<font color="#ff40ff"><strong>0</strong></font>, <font color="#ff40ff"><strong>0</strong></font>, w, h);<br>
<font color="#ffff00"><strong>118 </strong></font><br>
<font color="#ffff00"><strong>119 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glMatrixMode(GL_PROJECTION);<br>
<font color="#ffff00"><strong>120 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glLoadIdentity();<br>
<font color="#ffff00"><strong>121 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>&#160;glFrustum(- w/(GLdouble)h, w/(GLdouble)h, 1.0, -1.0, 1.0, 100.0); </strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>122 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glFrustum(<font color="#ff40ff"><strong>1.0</strong></font>, -<font color="#ff40ff"><strong>1.0</strong></font>,- h/(GLdouble)w, h/(GLdouble)w, <font color="#ff40ff"><strong>1.0</strong></font>, <font color="#ff40ff"><strong>100.0</strong></font>);<br>
<font color="#ffff00"><strong>123 </strong></font><br>
<font color="#ffff00"><strong>124 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;glMatrixMode(GL_MODELVIEW);<br>
<font color="#ffff00"><strong>125 </strong></font>}<br>
<font color="#ffff00"><strong>126 </strong></font><br>
<font color="#ffff00"><strong>127 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>128 </strong></font><font color="#00ffff"><strong>&#160;* map key state to the keytable</strong></font><br>
<font color="#ffff00"><strong>129 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>130 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onkey(<font color="#00ff00"><strong>unsigned</strong></font>&#160;<font color="#00ff00"><strong>char</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y)<br>
<font color="#ffff00"><strong>131 </strong></font>{<br>
<font color="#ffff00"><strong>132 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;keytable[key] = <font color="#ff40ff"><strong>1</strong></font>;<br>
<font color="#ffff00"><strong>133 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fire_key_event(key);<br>
<font color="#ffff00"><strong>134 </strong></font>}<br>
<font color="#ffff00"><strong>135 </strong></font><br>
<font color="#ffff00"><strong>136 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onkeyup(<font color="#00ff00"><strong>unsigned</strong></font>&#160;<font color="#00ff00"><strong>char</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y)<br>
<font color="#ffff00"><strong>137 </strong></font>{<br>
<font color="#ffff00"><strong>138 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;keytable[key] = <font color="#ff40ff"><strong>0</strong></font>;<br>
<font color="#ffff00"><strong>139 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fire_key_event(key);<br>
<font color="#ffff00"><strong>140 </strong></font>}<br>
<font color="#ffff00"><strong>141 </strong></font><br>
<font color="#ffff00"><strong>142 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onspeckey(<font color="#00ff00"><strong>int</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y)<br>
<font color="#ffff00"><strong>143 </strong></font>{<br>
<font color="#ffff00"><strong>144 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;keytable[key] = <font color="#ff40ff"><strong>1</strong></font>;<br>
<font color="#ffff00"><strong>145 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fire_key_event(key);<br>
<font color="#ffff00"><strong>146 </strong></font>}<br>
<font color="#ffff00"><strong>147 </strong></font><br>
<font color="#ffff00"><strong>148 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;onspeckeyup(<font color="#00ff00"><strong>int</strong></font>&#160;key, <font color="#00ff00"><strong>int</strong></font>&#160;x, <font color="#00ff00"><strong>int</strong></font>&#160;y)<br>
<font color="#ffff00"><strong>149 </strong></font>{<br>
<font color="#ffff00"><strong>150 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;keytable[key] = <font color="#ff40ff"><strong>0</strong></font>;<br>
<font color="#ffff00"><strong>151 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fire_key_event(key);<br>
<font color="#ffff00"><strong>152 </strong></font>}<br>
<font color="#ffff00"><strong>153 </strong></font><br>
<font color="#ffff00"><strong>154 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>155 </strong></font><font color="#00ffff"><strong>&#160;* handle the key event</strong></font><br>
<font color="#ffff00"><strong>156 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>157 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;fire_key_event(<font color="#00ff00"><strong>int</strong></font>&#160;key)<br>
<font color="#ffff00"><strong>158 </strong></font>{<br>
<font color="#ffff00"><strong>159 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>if</strong></font>&#160;(keytable[<font color="#ff40ff"><strong>27</strong></font>] || keytable[<font color="#ff40ff"><strong>'q'</strong></font>] || keytable[<font color="#ff40ff"><strong>'Q'</strong></font>]) {<br>
<font color="#ffff00"><strong>160 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;exit(<font color="#ff40ff"><strong>0</strong></font>);<br>
<font color="#ffff00"><strong>161 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} <br>
<font color="#ffff00"><strong>162 </strong></font>}<br>
<font color="#ffff00"><strong>163 </strong></font><br>
<font color="#ffff00"><strong>164 </strong></font><font color="#00ffff"><strong>/*</strong></font><font color="#00ffff"><strong>*</strong></font><br>
<font color="#ffff00"><strong>165 </strong></font><font color="#00ffff"><strong>&#160;* keyboard controlled rotate</strong></font><br>
<font color="#ffff00"><strong>166 </strong></font><font color="#00ffff"><strong>&#160;</strong></font><font color="#00ffff"><strong>*/</strong></font><br>
<font color="#ffff00"><strong>167 </strong></font><font color="#00ff00"><strong>void</strong></font>&#160;key_rotate()<br>
<font color="#ffff00"><strong>168 </strong></font>{<br>
<font color="#ffff00"><strong>169 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>if</strong></font>&#160;(keytable[GLUT_KEY_LEFT]) {<br>
<font color="#ffff00"><strong>170 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rotate += <font color="#ff40ff"><strong>1.0</strong></font>;<br>
<font color="#ffff00"><strong>171 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br>
<font color="#ffff00"><strong>172 </strong></font><br>
<font color="#ffff00"><strong>173 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>if</strong></font>&#160;(keytable[GLUT_KEY_RIGHT]) {<br>
<font color="#ffff00"><strong>174 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rotate -= <font color="#ff40ff"><strong>1.0</strong></font>;<br>
<font color="#ffff00"><strong>175 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br>
<font color="#ffff00"><strong>176 </strong></font><br>
<font color="#ffff00"><strong>177 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>if</strong></font>&#160;(keytable[GLUT_KEY_UP]) {<br>
<font color="#ffff00"><strong>178 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rotate2 += <font color="#ff40ff"><strong>1.0</strong></font>;<br>
<font color="#ffff00"><strong>179 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br>
<font color="#ffff00"><strong>180 </strong></font><br>
<font color="#ffff00"><strong>181 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<font color="#ffff00"><strong>if</strong></font>&#160;(keytable[GLUT_KEY_DOWN]) {<br>
<font color="#ffff00"><strong>182 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rotate2 -= <font color="#ff40ff"><strong>1.0</strong></font>;<br>
<font color="#ffff00"><strong>183 </strong></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br>
<font color="#ffff00"><strong>184 </strong></font>}<br>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/239c8526141ed61d8b82a147.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月24日 星期二  01:19</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/239c8526141ed61d8b82a147.html</guid>
</item>

<item>
        <title><![CDATA[本博客关闭]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/6f860824250bfd39c895598f.html]]></link>
        <description><![CDATA[
		
		因本站曾出现过激言论，故本站自今日起<font size="5"><strong>自觉关闭</strong></font>，望见谅！ 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/6f860824250bfd39c895598f.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月25日 星期五  01:12</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/6f860824250bfd39c895598f.html</guid>
</item>

<item>
        <title><![CDATA[JAILS更新]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/26160ef747c59128720eecb3.html]]></link>
        <description><![CDATA[
		
		一个周末，更新比较大，主要提供了一个重大特性，呵呵<br>
<br>
<strong><font size="4">现在，JAILS支持子视图（控件）了。无限级嵌套，任意页面嵌套，上下文独立。</font></strong> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/26160ef747c59128720eecb3.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月14日 星期一  14:09</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/26160ef747c59128720eecb3.html</guid>
</item>

<item>
        <title><![CDATA[这叫什么互联网！]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/f270d188a54c869ea4c272d6.html]]></link>
        <description><![CDATA[
		
		FK，还让不让上网了，能打开的全他妈脑残站，有用的全他妈屏蔽，什么世道 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/f270d188a54c869ea4c272d6.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月11日 星期五  13:06</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/f270d188a54c869ea4c272d6.html</guid>
</item>

<item>
        <title><![CDATA[RXVT配置]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/86f87c890cd1f9ba0f2444db.html]]></link>
        <description><![CDATA[
		
		搞了一下，弄了个不错的效果出来，备份一下。<br>
<br>
Rxvt.background:black<br>
Rxvt.foreground:gray<br>
Rxvt.colorBD:yellow<br>
Rxvt.colorUL:green<br>
Rxvt.multichar_encoding:gb2312<br>
Rxvt.scrollBar:True<br>
!!Rxvt.scrollBar_right:True<br>
Rxvt.scrollBar_floating: False<br>
Rxvt.scrollstyle: next<br>
Rxvt.saveLines:1500<br>
!!Rxvt.color0:black<br>
!!Rxvt.color1:red<br>
!!Rxvt.color2:#3a5da3<br>
!!Rxvt.color3:#4b76cc<br>
!!Rxvt.color4:RoyalBlue4<br>
!!Rxvt.color4:#123f75<br>
!!Rxvt.color5:magenta<br>
!!Rxvt.color6:#a1b5dd<br>
!!Rxvt.color7:#8a95aa<br>
!!Rxvt.color8:#616668<br>
!!Rxvt.color9:#075982<br>
!!Rxvt.color10:#0f82bc<br>
!!Rxvt.color11:#13a9f4<br>
Rxvt.color12:DodgerBlue<br>
!!Rxvt.color12:#3d99c6<br>
!!Rxvt.color13:#63c2f2<br>
!!Rxvt.color14:#6caccc<br>
!!Rxvt.color15:#dbeff9<br>
!!Rxvt.font:12x24<br>
Rxvt.font:-b&amp;h-lucidatypewriter-medium-r-normal-sans-17-120-100-100-m-100-iso8859-1,xft:WenQuanYi Bitmap Song-17:Normal<br>
!!Rxvt.mfont:xft:WenQuanYi Zen Hei-17:Normal<br>
Rxvt.menu:/etc/X11/rxvt.menu<br>
Rxvt.preeditType:Root<br>
<br>
效果图<br>
<a href="http://hiphotos.baidu.com/csllm/pic/item/5934263f0a3914c754e723fc.jpg" target="_blank"><img border="0" src="http://hiphotos.baidu.com/csllm/abpic/item/5934263f0a3914c754e723fc.jpg" small="1" class="blogimg"></a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/Notebook">Notebook</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/86f87c890cd1f9ba0f2444db.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月07日 星期一  00:17</pubDate>
        <category><![CDATA[Notebook]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/86f87c890cd1f9ba0f2444db.html</guid>
</item>

<item>
        <title><![CDATA[实现请求隔离]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/c1be80d6e19e6d2606088b45.html]]></link>
        <description><![CDATA[
		
		<p>概念：</p>
<p>在实现一个WebFramework的时候，要支持Control，那么如果在Control里向Request上下文里添加或修改了变量，不应该影响其父元素里的上下文。</p>
<p>例如：一个页面包含一个Control，页面处理的时候向上下文里放了个变量A=1，然后在Control里也向上下文里添加了变量A=2,控件渲染完成后，要求页面的上下文中A的值仍为预期的1。</p>
<p>实现方案：</p>
<p>引入一个上下文堆栈，在每一级的元素渲染前压入自己的上下文，上下文出入栈时自动与请求上下文同步。</p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/Notebook">Notebook</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/c1be80d6e19e6d2606088b45.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月05日 星期六  23:56</pubDate>
        <category><![CDATA[Notebook]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/c1be80d6e19e6d2606088b45.html</guid>
</item>

<item>
        <title><![CDATA[不用加班的周末]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/10fa3cc7ed170ad5d100600d.html]]></link>
        <description><![CDATA[
		
		在家闲着的感觉还不错 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/My%20Words">My Words</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/10fa3cc7ed170ad5d100600d.html#comment">查看评论</a>]]></description>
        <pubDate>2009年09月05日 星期六  13:35</pubDate>
        <category><![CDATA[My Words]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/10fa3cc7ed170ad5d100600d.html</guid>
</item>

<item>
        <title><![CDATA[jails开源了]]></title>
        <link><![CDATA[http://hi.baidu.com/csllm/blog/item/f910bb31007ad6a15edf0e3d.html]]></link>
        <description><![CDATA[
		
		哎呀，还是之前说过的，自己写的一个WEB框架，最开始呢，就是给GAE用用，现在功能更强大了，基本上能用了，就放出来，呵呵,上面的样例，直接照着写就OK了<br>
<a target="_blank" href="http://csllmproj.googlecode.com">http://csllmproj.googlecode.com</a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/csllm/blog/category/Releasees">Releasees</a>&nbsp;<a href="http://hi.baidu.com/csllm/blog/item/f910bb31007ad6a15edf0e3d.html#comment">查看评论</a>]]></description>
        <pubDate>2009年08月30日 星期日  11:40</pubDate>
        <category><![CDATA[Releasees]]></category>
        <author><![CDATA[zhzhxtrrk]]></author>
		<guid>http://hi.baidu.com/csllm/blog/item/f910bb31007ad6a15edf0e3d.html</guid>
</item>


</channel>
</rss>