转~Android OpenGL ES 2.0 (六)之 Responding to Touch Events

Making objects move according to a preset program like the rotating triangle is useful for getting some attention, but what if you want to have users interact with your OpenGL ES graphics? The key to making your OpenGL ES application touch interactive is expanding your implementation of GLSurfaceView to override the onTouchEvent() to listen for touch events.

继续阅读

转~Android OpenGL ES 2.0 (五)之 Adding Motion

Drawing objects on screen is a pretty basic feature of OpenGL, but you can do this with other Android graphics framwork classes, including Canvas and Drawable objects. OpenGL ES provides additional capabilities for moving and transforming drawn objects in three dimensions or in other unique ways to create compelling user experiences.

继续阅读

转~Android OpenGL ES 2.0 (四)之 Applying Projection and Camera Views

In the OpenGL ES environment, projection and camera views allow you to display drawn objects in a way that more closely resembles how you see physical objects with your eyes. This simulation of physical viewing is done with mathematical transformations of drawn object coordinates:

继续阅读

转~Android OpenGL ES 2.0 (一)之 Building an OpenGL ES Environment

In order to draw graphics with OpenGL ES in your Android application, you must create a view container for them. One of the more straight-forward ways to do this is to implement both a GLSurfaceView and a GLSurfaceView.Renderer. A GLSurfaceView is a view container for graphics drawn with OpenGL and GLSurfaceView.Renderer controls what is drawn within that view. For more information about these classes, see the OpenGL ES developer guide.

继续阅读

转~山丘

词曲:李宗盛

想说却还没说的 还很多
攒着是因为想写成歌
让人轻轻地唱着 淡淡地记着
就算终于忘了 也值了
说不定我一生涓滴意念
侥幸汇成河
然后我俩各自一端
望着大河弯弯 终于敢放胆
嘻皮笑脸 面对 人生的难
也许我们从未成熟
还没能晓得 就快要老了
继续阅读

转~java中的sizeof

在C/C++中,当我们想知道一个对象或者一个原始数据类型所占用的内存大小时,只需简单调用sizeof操作符即可,但是,在java中是没有相应的操作符或者方法来直接完成相应功能的。sizeof在C/C++得到大量的运用,是程序员必不可少的工具之一,那么为什么java却不提供呢?要回答这个问题,我们可以从另外一个角度来看,那就是为什么C/C++中要使用sizeof。 继续阅读

感悟

状态

今天的悲哀是昨天造成的,明天的成功是今天努力的。昨天已然过去,不要为昨天无知造成的悲哀感到失落,记着今天努力的工作会看到明天明亮的天…

转~Eclipse文件保存编码问题

如果要使插件开发应用能有更好的国际化支持,能够最大程度的支持中文输出,则最好使Java文件使用UTF-8编码。然而,Eclipse工作空间(workspace)的缺省字符编码是操作系统缺省的编码,简体中文操作系统 (Windows XP、Windows 2000简体中文)的缺省编码是GB18030,在此工作空间中建立的工程编码是GB18030,工程中建立的java文件也是GB18030。如果要使新建立工程、java文件直接使UTF-8则需要做以下工作:
继续阅读