android, OpenGL | 02:58http://d.hatena.ne.jp/kambayashi/20090711/1247591143のサンプルを使用。http://d.hatena.ne.jp/kambayashi/20090714/1247677550までの変更を加えたバージョン。テクスチャ(画像)を用意する画像は縦横が2のn乗のサイズにする(64x64、128x128、256x256など)。小さすぎると読めないが32x32以上くらいにしておけば安心。今回使用するテクスチャはこれ。サイズは64x64。テクスチャをプロジェクトに入れる(プロジェクトディレクトリ)/res/drawableにコピーする。上記のディレクトリに入れた後、eclipse上でプロジェクトを右クリックしてメニューを開き、リフレッシュを選択する。テクスチャ用の機能設定を行うhttp://d.hatena
glOrthof → orthography 正射影 おーそがふぃい glFrustumf → Frustum 円錐台 ふらっすたむ 知らねーし、そんな単語。 「いえす・うぃ・きゃん!」くらいしか知らねえからオレ。はあ?何言っての?はあ? そーいう非ネイティブスピーカーに厳しいトス上げちゃいかんOpenGL。 クローズしてるからネーミングの点で。 ふぅ。 ま、いいけどさ。 とりあえず glVertexPointer(2, GL_FLOAT, 0, squareVertices); glEnableClientState(GL_VERTEX_ARRAY); glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors); glEnableClientState(GL_COLOR_ARRAY); glDrawArrays(GL_TRIANGLE_STR
今回は基本的なオブジェクトとして立方体の表示方法を説明します。 以前のエントリ"OpenGLの簡単な遊び方"と同じように、"OpenGL ES Application"のテンプレートを使って説明します。 ・新規プロジェクト作成 新規プロジェクト作成時に"OpenGL ES Application"のテンプレートを選びます。 ・立方体のオブジェクト定義 "EAGLView.m"にあるdrawViewメソッドを修正します。 立方体の頂点を定義するために、squareVerticesの配列定義を以下のように修正します。 const GLfloat squareVertices[] = { -0.5f, -0.5f, -0.5f, 0.5f, -0.5f, -0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f, -0.5f, -0.5f, -0.5f, 0.5f, 0.5f,
WebOS Goodies へようこそ! WebOS はインターネットの未来形。あらゆる Web サイトが繋がり、共有し、協力して創り上げる、ひとつの巨大な情報システムです。そこでは、あらゆる情報がネットワーク上に蓄積され、我々はいつでも、どこからでも、多彩なデバイスを使ってそれらにアクセスできます。 WebOS Goodies は、さまざまな情報提供やツール開発を通して、そんな世界の実現に少しでも貢献するべく活動していきます。 最近 iPhone を買った勢いで iPhone プログラミングを始めました。これまでも iPod touch があったのでその気になればできたのですが、 Objective-C や Cocoa を覚えるのが面倒くさくて手を出していませんでした。しかし、 iPhone を使っているうちに面白い題材に気付いたのです。そう、 OpenGL です。 実は私は数年前までは
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く