<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>vbo &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/vbo/</link>
	<description>Feed of posts on WordPress.com tagged "vbo"</description>
	<pubDate>Fri, 05 Sep 2008 05:47:27 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[VBOs]]></title>
<link>http://aevirex.wordpress.com/?p=30</link>
<pubDate>Thu, 14 Aug 2008 17:40:24 +0000</pubDate>
<dc:creator>aevirex</dc:creator>
<guid>http://aevirex.wordpress.com/?p=30</guid>
<description><![CDATA[I managed to do quite something lately. That stuff is however visually not very appealing. First of ]]></description>
<content:encoded><![CDATA[<p>I managed to do quite something lately. That stuff is however visually not very appealing. First of all I got rid of a few bugs in my GLSL implementation. Here is how you use GLSL within C/C++.</p>
<p>You will likely need these extensions:</p>
<p>[sourcecode language='cpp']<br />
PFNGLCREATEPROGRAMOBJECTARBPROC     glCreateProgramObjectARB;<br />
PFNGLDELETEOBJECTARBPROC            glDeleteObjectARB;<br />
PFNGLCREATESHADEROBJECTARBPROC      glCreateShaderObjectARB;<br />
PFNGLSHADERSOURCEARBPROC            glShaderSourceARB;<br />
PFNGLCOMPILESHADERARBPROC           glCompileShaderARB;<br />
PFNGLGETOBJECTPARAMETERIVARBPROC    glGetObjectParameterivARB;<br />
PFNGLATTACHOBJECTARBPROC            glAttachObjectARB;<br />
PFNGLGETINFOLOGARBPROC              glGetInfoLogARB;<br />
PFNGLLINKPROGRAMARBPROC             glLinkProgramARB;<br />
PFNGLUSEPROGRAMOBJECTARBPROC        glUseProgramObjectARB;<br />
PFNGLGETUNIFORMLOCATIONARBPROC      glGetUniformLocationARB;<br />
PFNGLUNIFORM1FARBPROC               glUniform1fARB;<br />
PFNGLUNIFORM1IARBPROC               glUniform1iARB;<br />
[/sourcecode]</p>
<p>Use something like GLee or GLEW or do it the way I explained in my last post. Next you need to load your shaders, compile them, attach them, link them and use them. Here is pretty much my code (which is pretty much from <a href="http://nehe.gamedev.net/data/articles/article.asp?article=21" target="_blank">NeHe</a>):</p>
<p>[sourcecode language='cpp']<br />
void loadShader(char const *vs_filename, char const *ps_filename)<br />
{<br />
  char *vertex_shader_source = NULL, *pixel_shader_source = NULL;</p>
<p>  // reading shaders from file<br />
  vertex_shader_source = Helper::readFile(vs_filename);<br />
  pixel_shader_source  = Helper::readFile(ps_filename);</p>
<p>  GLuint shader_program, vertex_shader, pixel_shader;</p>
<p>  shader_program  = glCreateProgramObjectARB();<br />
  vertex_shader   = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);<br />
  pixel_shader    = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);</p>
<p>  glShaderSourceARB(vertex_shader, 1, (const GLcharARB**)&vertex_shader_source, NULL);<br />
  glShaderSourceARB(pixel_shader,  1, (const GLcharARB**)&pixel_shader_source,  NULL);</p>
<p>  glCompileShaderARB(vertex_shader);<br />
  glCompileShaderARB(pixel_shader);</p>
<p>  glAttachObjectARB(shader_program, vertex_shader);<br />
  glAttachObjectARB(shader_program, pixel_shader);</p>
<p>  glLinkProgramARB(shader_program);</p>
<p>  glUseProgramObjectARB(shader_program);</p>
<p>  delete [] vertex_shader_source;<br />
  delete [] pixel_shader_source;<br />
}<br />
[/sourcecode]</p>
<p>I suggest that you check for errors (caused much headache). glGetError() is your friend. Also take a look at the GLSL specification. For instance <em>varying </em>variables have to be declared both in the vertex and fragment shader.</p>
<p>The big achievement as of lately was to make VBOs work. VBOs or Vertex Buffer Objects allow to store the mesh data in the video memory (or wherever it is most performant). They are also called with few functions, thus eliminating the overhead of the immediate mode.</p>
<p>A downside however is that there is only one Index Buffer per VBO which means that you have to syncronize your data (vertices, vertex normals, texture coordinates). So you have store three vertices, three vertex normals and three texture coordinates for every triangle. A lot of redundancy but still a lot faster than the immediate mode.</p>
<p>Here is a (boring) screenshot (thanks again to aphlA for the sphere):</p>
<p><a href="http://aevirex.files.wordpress.com/2008/08/texturedvbo1.png"><img class="alignnone size-full wp-image-41" src="http://aevirex.wordpress.com/files/2008/08/texturedvbo1.png" alt="" width="646" height="505" /></a></p>
<p><img src="/DOKUME~1/DRG/LOKALE~1/Temp/moz-screenshot.jpg" alt="" />Needless to say that my .obj loader works now. \o/</p>
<p>I wish I would use a version control system, because I had a simple test implementation which would explain VBOs somewhat nicely but now I only have my fairly complex .obj loader. Sorry. I hope this is still somewhat understandable:</p>
<p>[sourcecode language='cpp']<br />
void createTestBuffer(GLuint *v_buffer, GLuint *i_buffer, GLuint *vertex_count)<br />
{<br />
  GLuint vert_buffer  = 0;<br />
  GLuint index_buffer = 0;<br />
  // a simple plane:<br />
  GLfloat vertices[] = {<br />
    -1, -1, 0,   // 0<br />
    -1,  1, 0,   // 1<br />
    1,   1, 0,   // 2<br />
    1,  -1, 0 }; // 3<br />
  GLuint vert_size = 12;</p>
<p>  // indexing the "vertices"<br />
  GLuint indices[] = {<br />
    0, 1, 2,<br />
    0, 2, 3 };<br />
  GLuint index_size = 6;</p>
<p>  glGenBuffersARB(1, &vert_buffer);<br />
  glBindBufferARB(GL_ARRAY_BUFFER_ARB, vert_buffer);<br />
  glBufferDataARB(GL_ARRAY_BUFFER_ARB, vert_size * sizeof(GLfloat), vertices, GL_STATIC_DRAW_ARB);</p>
<p>  glGenBuffersARB(1, &index_buffer);<br />
  glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER, index_buffer);<br />
  glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER, index_size * sizeof(GLuint), indices, GL_STATIC_DRAW_ARB);</p>
<p>  *v_buffer = vert_buffer;<br />
  *i_buffer = index_buffer;<br />
  *vert_count = index_size; // number_of_tris * 3<br />
}<br />
[/sourcecode]</p>
<p>Rendering the VBO:</p>
<p>[sourcecode language='cpp']<br />
void render()<br />
{<br />
  // assume v_buffer, i_buffer and vert_count are global variables...<br />
  glBindBufferARB(GL_ARRAY_BUFFER_ARB, v_buffer);<br />
  glVertexPointer(3, GL_FLOAT, 0, (char*)NULL);</p>
<p>  glEnableClientState(GL_VERTEX_ARRAY);</p>
<p>  glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, i_buffer);<br />
  glDrawElements(GL_TRIANGLES, vert_count, GL_UNSIGNED_INT, 0);</p>
<p>  glDisableClientState(GL_VERTEX_ARRAY);<br />
}<br />
[/sourcecode]</p>
<p>That's mostly from memory, so excuse any errors (or write a comment).</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[GPU Programming: Vertex Buffer Object(VBO)]]></title>
<link>http://parasatria.wordpress.com/?p=355</link>
<pubDate>Mon, 28 Jul 2008 19:44:14 +0000</pubDate>
<dc:creator>m teguh satria</dc:creator>
<guid>http://parasatria.wordpress.com/?p=355</guid>
<description><![CDATA[GL_ARB_vertex buffer object extension dikembangkan untuk meningkatkan performa OpenGL dengan memanfa]]></description>
<content:encoded><![CDATA[<p style="text-align:justify;"><em>GL_ARB_vertex buffer object extension</em> dikembangkan untuk meningkatkan performa OpenGL dengan memanfaatkan fungsi dari fasilitas <em>vertex array </em>dan <em>display list</em> pada OpenGL.</p>
[caption id="attachment_385" align="aligncenter" width="416" caption="Sample VBO application"]<img class="size-full wp-image-385" src="http://parasatria.wordpress.com/files/2008/07/vbo.png" alt="Sample VBO application" width="416" height="336" />[/caption]
<p style="text-align:justify;">Menggunakan <em>vertex array</em> dapat mengurangi pemanggilan fungsi dan kelebihan <em>shared vertices</em>. Sayangnya, fungsi-fungsi <em>vertex array</em> berada pada sisi klien dan data pada <em>array-array</em> harus di kirim ulang ke <em>server </em>tiap kali ia dibutuhkan. Meskipun sebenarnya <em>display list</em> yang berada di sisi <em>server</em> takkan mengalami gangguan apapun atas pengiriman data yang berulang-ulang. Hanya saja, yang menjadi masalah adalah, ketika <em>display list</em> di-<em>compile</em>, data pada <em>display list</em> tidak dapat dimodifikasi.</p>
<p style="text-align:justify;">Vertex Buffer Object (VBO) hadir untuk mengatasi masalah tersebut. VBO mengalokasikan <em>buffer objects </em>pada <em>graphics memory</em> untuk atribut <em>vertex</em> dan menyediakan beberapa fungsi sebagai akses ke <em>array</em> tersebut. Fungsi-fungsi tersebut digunakan di <em>vertex arrays</em>, seperti glVertexPointer(), glNormalPointer(), glTexCoordPointer(), dan lainnya. Data pada VBO dapat dibaca dan dimodifikasi dengan melakukan <em>mapping buffer object</em> ke dalam RAM. Kelebihan lain VBO adalah <em>sharing buffer object </em>dengan sejumlah klien seperti <em>display list</em> dan <em>texture-texture.</em> Karena VBO berada pada sisi <em>server</em>, maka <em>multiple clients </em>dapat mengakses <em>buffer</em> yang sama.<!--more--></p>
<p style="text-align:justify;"><em>Memory manager </em>pada VBO akan memilihkan posisi terbaik untuk <em>buffer object</em> di dalam <em>memory </em>berdasarkan parameter <em>target</em> dan <em>usage</em>. Sehingga<em> memory manager</em> dapat mengoptimalkan<em> buffer-buffer </em>dengan menyeimbangkan 3 jenis memory: <em>system, AGP</em>, dan <em>video memory</em>.<br />
Langkah-langkah yang terdapat pada VBO:</p>
<ol>
<li>Creating VBO</li>
<li>Drawing VBO</li>
<li>Updating VBO</li>
</ol>
<p style="text-align:justify;"><strong>Creating VBO</strong><br />
Pada bagian ini terdatap 3 langkah:</p>
<ol>
<li><em>Generate a new buffer</em> object dengan glGenBuffersARB().</li>
<p><em>glGenBuffersARB()</em><br />
glGenBuffersARB() membangun<em> buffer objects</em> dengan <em>identifier</em>-nya sebagai <em>return</em>. Ia memiliki 2 parameter: yang pertama adalah jumlah <em>buffer object</em> yang dibangun, dan yang kedua adalah alamat dari <em>array </em>yang disimpan sebuah <em>single ID</em> ataupun <em>multiple IDs</em>.</p>
<p><code>void glGenBuffersARB(GLsizei n, GLuint* ids)</code></p>
<li>Bind the buffer object dengan glBindBufferARB().</li>
<p style="text-align:justify;"><em>glBindBufferARB()</em><br />
glBindBufferARB() melakukan <em>binding</em> terhadap <em>buffer object</em> yang akan digunakan. Ia memiliki 2 parameter: <em>target</em> dan <em>identifier</em>.</p>
<p style="text-align:justify;"><code>void glBindBufferARB(GLenum target, GLuint id)</code></p>
<p style="text-align:justify;"><em>target</em> adalah petunjuk untuk memberitahu VBO apakah <em>buffer object</em> digunakan untuk menyimpan <em>vertex array data</em> atau <em>index array data</em>: GL_ARRAY_BUFFER_ARB atau GL_ELEMENT_ARRAY_ARB.  Tiap atribut <em>vertex</em>, seperti <em>vertex coordinates, texture coordinates,</em> <em>normals and color component arrays</em> menggunakan GL_ARRAY_BUFFER_ARB. <em>Index array </em>yang digunakan untuk <strong>glDraw[Range]Elements() </strong>menggunakan GL_ELEMENT_ARRAY_BUFFER_ARB. Parameter target membantu VBO dalam menentukan posisi yang  paling efisien dari sebuah <em>buffer object</em>, sebagai contoh, beberapa sistem lebih memilih di <em>AGP</em> atau <em>system memory</em>, dan <em>vertex-vertex</em> di <em>video memory</em>.</p>
<p style="text-align:justify;">Ketika glBindBufferARB() dipanggil, VBO memberikan 0 sebagai nilai awal <em>buffer </em>pada <em>memory buffer.</em></p>
<li>Copy vertex data ke dalam buffer object dengan glBufferDataARB().</li>
<p style="text-align:justify;"><em>glBufferDataARB()</em> berfungsi mengirim data ke dalam <em>buffer object</em>.</p>
<p style="text-align:justify;"><code>void glBufferDataARB(GLenum target, GLsizei size, const void* data, GLenum usage)</code></p>
<p style="text-align:justify;">Sama seperti sebelumnya <em>target</em> dengan pilihan GL_ARRAY_BUFFER_ARB atau GL_ELEMENT_ARRAY_ARB. <em>size </em>adalah jumlah <em>byte</em> dari data yang akan dikirim. Parameter ketiga adalah <em>pointer</em> dari <em>data array.</em> Jika data adalah <em>NULL pointer</em>, maka VBO hanya menyediakan <em>memory space </em>dengan ukuran yang diberikan. <em> usage</em> adalah petunjuk untuk VBO tentang tujuan menggunakan <em>buffer object: static, dynamic, </em>atau<em> stream,</em> dan <em>read, copy </em>atau <em>draw</em>.</p>
<p style="text-align:justify;">Pilihan-pilihan untuk parameter usage:<br />
GL_STATIC_DRAW_ARB<br />
GL_STATIC_READ_ARB<br />
GL_STATIC_COPY_ARB<br />
GL_DYNAMIC_DRAW_ARB<br />
GL_DYNAMIC_READ_ARB<br />
GL_DYNAMIC_COPY_ARB<br />
GL_STREAM_DRAW_ARB<br />
GL_STREAM_READ_ARB<br />
GL_STREAM_COPY_ARB</p>
<p style="text-align:justify;"><em>“static”</em> berarti data di dalam VBO takkan diubah (ditentukan sekali dan digunakan berulang-ulang). <em>“dynamic”</em> berarti data akan diubah sewaktu-waktu (ditentukan dan digunakan berulang-ulang). <em>“stream”</em> berarti data akan berubah tiap <em>frame</em> (ditentukan sekali dan digunakan sekali).<br />
<em>“draw”</em> berarti data akan dikirim ke GPU agar ditampilkan (aplikasi menuju GL). <em>“read” </em>berarti data akan dibaca oleh aplikasi klien (GL menuju aplikasi). <em>“copy”</em> berarti data akan digunakan untuk keduanya, ditampilkan dan dibaca (GL menuju GL).</p>
<p style="text-align:justify;">VBO memory manager akan memilih tempat yang tepat untuk <em>buffer object </em>di dalam memory berdasarkan parameter <em>usage</em> yang dipilih. Sebagai contoh, GL_STATIC_DRAW_ARB dan GL_STREAM_DRAW_ARB mungkin menggunakan <em>video memory</em>, dan GL_DYNAMIC_DRAW_ARB mungkin menggunakan <em>AGP memory</em>. Tiap _READ_ <em>buffer</em> akan lebih baik bila ditempatkan di <em>system</em> ataupun <em>AGP memory</em> karena data akan lebih mudah diakses.</p>
</ol>
<p style="text-align:justify;">Beberapa fungsi lain pada VBO yang dapat digunakan adalah glBufferSubDataARB() dan glDeleteBuffersARB().</p>
<p style="text-align:justify;">glBufferSubDataARB() juga digunakan untuk meng-<em>copy</em> data ke dalam VBO, sama seperti glBufferDataARB(). Bedanya, glBufferSubDataARB() hanya mengisi ulang data pada <em>buffer</em> yang telah tersedia, dengan s<em>tarting point</em> pada <em>offset</em> yang diberikan. Jadi glBufferSubDataARB() hanya dapat digunakan apabila kita sudah pernah memanggil glBufferDataARB().</p>
<p style="text-align:justify;"><code>void glBufferSubDataARB(GLenum target, GLint offset, GLsizei size, void* data)</code></p>
<p style="text-align:justify;">glDeleteBuffersARB() digunakan untuk menghapus VBO. Setelah <em>buffer object</em> dihapus, semua <em>content</em> di dalamnya akan hilang.</p>
<p style="text-align:justify;"><code>void glDeleteBuffersARB(GLsizei size, GLuint* ids)</code></p>
<p style="text-align:justify;">Secara keseluruhan code untuk creating VBO.</p>
<p style="text-align:justify;"><code>GLuint vboId;                              // ID of VBO<br />
GLfloat* vertices = new GLfloat[vCount*3]; // create vertex array<br />
...<br />
</code></p>
<p style="text-align:justify;"><code>// generate a new VBO and get the associated ID<br />
glGenBuffersARB(1, &#38;vboId);</code></p>
<p style="text-align:justify;"><code>// bind VBO in order to use<br />
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId);</code></p>
<p style="text-align:justify;"><code>// upload data to VBO<br />
glBufferDataARB(GL_ARRAY_BUFFER_ARB, dataSize, vertices, GL_STATIC_DRAW_ARB);</code></p>
<p style="text-align:justify;"><code>// it is safe to delete after copying data to VBO<br />
delete [] vertices;<br />
...<br />
</code></p>
<p style="text-align:justify;"><code>// delete VBO when program terminated<br />
glDeleteBuffersARB(1, &#38;vboId);</code></p>
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>Drawing VBO</strong><br />
Karena VBO berada di atas implementasi <em>vertex array,</em> maka rendering VBO hampir sama dengan menggunakan <em>vertex array</em>. Perbedaannya adalah <em>pointer </em>(yang sebelumnya ditujukan untuk <em>vertex array</em>) digunakan sebagai <em>offset</em> pada <em>buffer object</em>. Oleh karena itu tidak dibutuhkan tambahan API untuk menampilkan VBO kecuali glBindBufferARB().</p>
<p style="text-align:justify;"><code>// bind VBOs for vertex array and index array<br />
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId1);       // for vertex coordinates<br />
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, vboId2); // for indices</code></p>
<p style="text-align:justify;"><code>// do same as vertex array except pointer<br />
glEnableClientState(GL_VERTEX_ARRAY);                 // activate vertex coords array<br />
glVertexPointer(3, GL_FLOAT, 0, 0);                   // last param is offset, not ptr</code></p>
<p style="text-align:justify;"><code>// draw 6 quads using offset of index array<br />
glDrawElements(GL_QUADS, 24, GL_UNSIGNED_BYTE, 0);</code></p>
<p style="text-align:justify;"><code>glDisableClientState(GL_VERTEX_ARRAY);             // deactivate vertex array</code></p>
<p style="text-align:justify;"><code>// bind with 0, so, switch back to normal pointer operation<br />
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);<br />
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);   //switch off VBO operation</code></p>
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>Updating VBO</strong><br />
Cara sederhana untuk mengubah data pada VBO adalah dengan meng-<em>copy</em> data baru ke dalam VBO dengan menggunakan glBufferDataARB() atau glBufferSubDataARB(). Tetapi ini berarti anda harus selalu menyediakan 2 data vertex: yang satu digunakan di aplikasi, yang satu lagi berada di VBO.</p>
<p style="text-align:justify;">Cara lainnya adalah melakukan <em>mapping buffer object </em> ke dalam RAM dan anda dapat memodifikasi data dengan <em>pointer</em> ke <em>mapped buffer</em>. Berikut penjelasannya.</p>
<p style="text-align:justify;"><em>glMapBufferARB()<br />
</em>glMapBufferARB() untuk melakukan <em>mapping buffer object</em> ke dalam RAM.</p>
<p style="text-align:justify;"><code>void* glMapBufferARB(GLenum target, GLenum access)</code></p>
<p style="text-align:justify;">contoh:<br />
<code>float *ptr<br />
= (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB);</code></p>
<p style="text-align:justify;">Parameter<em> target </em>sama seperti penjelasan sebelumnya. Sedang <em>access </em>menentukan tujuan menggunakan <em>mapped data</em>:</p>
<p style="text-align:justify;"><em>read</em> : GL_READ_ONLY_ARB<br />
<em>write</em> : GL_WRITE_ONLY_ARB<br />
<em>read and write</em> :GL_READ_WRITE_ARB</p>
<p style="text-align:justify;">glMapBufferARB() menyebabkan masalah sinkronisasi. Jika GPU sedang bekerja pada <em>buffer object </em>maka glMapBufferARB() tidak akan berfungsi hingga GPU selesai menyelesaikan tugasnya yang berkaitan dengan <em>buffer object</em>. Untuk mencegah <em>idle time</em>, anda dapat memanggil glBufferDataARB() dengan<em> NULL pointer</em>, dan kemudian memanggil glMapBufferARB(). Dalam hal ini, data sebelumnya akan dibatalkan dan kemudian glMapBufferARB() akan segera memberikan alokasi <em>pointer</em> baru, meskipun GPU masih bekerja dengan data sebelumnya.</p>
<p style="text-align:justify;">Bagaimanapun, metode ini berlaku jika anda ingin mengubah data set yang ada karena anda membatalkan data sebelumnya. Tetapi jika anda ingin mengubah sebagian data atau hanya ingin membaca data, maka sebaiknya anda tidak membatalkan data sebelumnya.</p>
<p style="text-align:justify;">glUnmapBufferARB()<br />
Setelah memodifikasi data pada VBO, anda harus melakukan <em>unmapping buffer object</em> dari <em>RAM</em>.</p>
<p style="text-align:justify;"><code>GLboolean glUnmapBufferARB(GLenum target)</code></p>
<p style="text-align:justify;">glUnmapBufferARB() memberikan nilai GL_TRUE jika berhasil. Jika ia mengembalikan GL_FALSE, ini berarti data pada VBO mengalami <em>corrupt</em> ketika proses <em>mapping buffer object</em> ke RAM. Untuk kasus ini, data baru harus dikirim ulang ke VBO. Berikut <em>sample code</em> untuk modifikasi data pada VBO.</p>
<p style="text-align:justify;"><code>// bind then map the VBO<br />
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId);<br />
float* ptr<br />
= (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);<br />
</code></p>
<p style="text-align:justify;"><code>// if the pointer is valid(mapped), update VBO<br />
if(ptr)<br />
{<br />
updateMyVBO(ptr, ...);                 // modify buffer data<br />
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); // unmap it after use<br />
}<br />
</code></p>
<p style="text-align:justify;"><code>// you can draw the updated VBO<br />
...</code></p>
<p style="text-align:justify;">referensi: <a href="http://www.songho.ca/" target="_blank">song ho ahn</a></p>
<p style="text-align:justify;">download sample code(VStudio2005) : <a href="http://www.adrive.com/public/636f3cad2a67fa598eee673338ecd906a79f2dd877c3caeeecb62f15688b46f2.html" target="_blank">SampleVBO.rar</a>, diperlukan library <a href="http://www.xmission.com/~nate/glut.html" target="_blank">glut</a> dan <a href="http://glew.sourceforge.net/install.html" target="_blank">glew</a></p>
<p style="text-align:justify;"><a href="http://www.songho.ca/" target="_blank"></a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[This day, 1 year ago...]]></title>
<link>http://kstars.wordpress.com/?p=123</link>
<pubDate>Thu, 12 Jun 2008 01:53:10 +0000</pubDate>
<dc:creator>Akarsh Simha</dc:creator>
<guid>http://kstars.wordpress.com/?p=123</guid>
<description><![CDATA[&#8230; Amar and I were at the gate of the observatory, seeing off the group of M.Phil students work]]></description>
<content:encoded><![CDATA[<p>... Amar and I were at the gate of the observatory, seeing off the group of M.Phil students working under Dr. Shylaja after a rather unproductive night. I can't recall whether we had slept at all in the past 24 hours. Anyway, such are the times when sleep didn't matter. I would've probably spent the day at the computer room in the mezzanine floor, telling people back at Bangalore my experiences, posting on one of those mailing lists, playing around with my newly acquired acquaintance - <a href="http://iraf.noao.edu/">IRAF</a>, or checking the SB What's Observable site on JPL and noting down RAs and Decs of Vesta or some other asteroid.</p>
<p>That night was a very eventful night indeed. Amar and I probably became two of the few fortunate amateur astronomers in India who would've gotten to use a 40" telescope, and even look through it.</p>
<p>The night of 12th June 2007 was pretty eventful for us. We had Mr. K. Kuppuswamy on duty, to operate the Zeiss 1m telescope and the PixCellent 1K CCD camera attached to it. The skies were clearing, but there was lightning at a distance in the north. We were walking on the corridor along with Mr. Kuppuswamy, learning about the joint discovery of Uranus' rings, about how it was an observation of Uranus' occultation of a star from 4 observatories (including the Kuiper Airborne Observatory, which is credited for this discovery) and how Dr. J C Bhattacharya was looking through the eyepiece and Mr. Kuppuswamy at the photomultiplier's graph-sheet recorder noticed a sudden drop of the number of counts, waiting for the lightning to subside.</p>
<p>Finally, we went in and switched on the console, after the lightning became less. But the humidity was rising. We quickly took spectra of each of Jupiter's moons, 6 spectra of Jupiter (in different slit positions) and the spectrum of Vesta. In between somewhere, Mr. Kuppuswamy was taking the comparison spectrum and we noticed dew formation on the CCD. He pumped in nitrogen. The dew went away. We had continued our photography. Soon, the Nitrogen would no longer help, not even a continuous supply. We shut down the CCD and did some visual observing at the eyepiece of the spectrograph, just for fun!</p>
<p>It was a nice experience for all three of us. We requested Mr. Kuppuswamy to slew to M22. I went to the UAGS' eyepiece and saw an "Open cluster"!!! Such was the resolving power of the 40"! We slewed to M27 sometime, but it required extreme averted vision - the night wasn't very clear, and the f/13 scope's magnification was such that M27 filled the whole eyepiece field of view!! We also slewed to "Blinking Planetary" in Cygnus. We could see the blue colour easily and I don't remember whether or not we saw the central star. It was a good sight, though.</p>
<p>Jupiter through the 8" f/15 finder scope was probably the best view of Jupiter I've had till date. The amazing refractor from Zeiss is only a finder scope for the 40"!! To center an object, you first take note of its RA/Dec, slew the telescope till IIA's Dome Control program reads the same, then center it in the 8" (I don't remember if the 4" was functional. If it was, we'd have had to center it there first), then in the eyepiece of the UAGS of the mighty 40"!</p>
<p>I still appreciate the beautiful complexity of IRAF. I managed to install it finally and it now works. I processed today, 1 year later, the images taken about 364.8 days ago! (Please bow down to my postponing skills). And seeing the results today bring to me almost the same joy that the experience of taking them did.</p>
<p><strong>IMPORTANT NOTE:</strong> I have not confirmed whether I have copyrights for these images. Although these images have been uploaded, they belong to Dr. B S Shylaja of the JNP. I will be verifying with her the copyrights of these images shortly.</p>
<p>These spectra were taken with the Universal Astronomical Grating Spectrograph (UAGS) and PixCellent 1K CCD camera with 2x2 binning at the Zeiss 1m telescope at the Vainu Bappu Observatory, Kavalur. Thanks to Dr. Sunetra Giridhar, Dr. B S Shylaja and the Director, IIA for giving me an opportunity to avail these spectra.</p>
<p>I didn't have the Fe-Ne comparison chart, so I had to virtually cook-up values for spectral lines looking at <a href="http://www.chem.ufl.edu/~itl/4411L_f00/hatom/hatom.html">this</a>, and comparing the spectrum of Vega that we took on 9th June 2007 with <a href="http://www.astrosurf.com/buil/us/vatlas/vega0.gif">this</a>. Interestingly, the spectrum of Vega matches pretty well and it puts what I think is the H-Beta line at 4879 angstrom instead of 4861 angstrom, which is an error of 0.4%!</p>
<p><a href="http://members.bas.org.in/kstar/jupiter1.png"><img src="http://members.bas.org.in/kstar/jupiter1.png" width="500"></a><br />
Spectrum of some portion of Jupiter. (The details of which portion this is are in my log book that I left with Dr. Shylaja.)</p>
<p><a href="http://members.bas.org.in/kstar/jupiter1_reflectance.png"><img src="http://members.bas.org.in/kstar/jupiter1_reflectance.png" width="500"></a><br />
This is after removing a vague continuum spectrum from Jupiter's spectrum above. We can again see the H-Beta line @ ~486nm and the feature at the Sodium and Helium D lines. This doesn't mean the Jupiter is full of Hydrogen, but is because the light from Jupiter is reflected sunlight! I need to learn and subtract the Solar Spectrum from this to get a pure Jupiter's reflectance spectrum.</p>
<p><a href="http://members.bas.org.in/kstar/vega.png"><img src="http://members.bas.org.in/kstar/vega.png" width="500"></a><br />
This is the spectrum of Vega. It matches pretty well with the one I linked in earlier. The feature at 600nm is what I used to align the comparison spectrum!</p>
<p><a href="http://members.bas.org.in/kstar/vega_absorption.png"><img src="http://members.bas.org.in/kstar/vega_absorption.png" width="500"></a><br />
This is the spectrum of Vega, after removing the continuum. The continuum matched very well in this case (pure blackbody!) and once that was removed, the features became more clear. Once can see the same features of Hydrogen and Helium (?) at 486 nm and 587 nm. Wikipedia lists a diatomic oxygen Fraunhofer line at 628nm, and I was wondering if the small peak at a similar location could be that. I have not subtracted the sky spectrum. I'm yet to check out the possibility of doing this.</p>
<p>I really enjoyed the processing. It took me all night. I didn't have my notes on IRAF commands, so it was partly from memory that you had to do something called 'epar apall' and from Google. These documents helped me:<br />
1. <a href="http://www.aavso.org/observing/programs/ccd/zen_of_iraf.pdf">The Zen of IRAF</a> for the CCD Processing part<br />
2. <a href="http://iraf.noao.edu/faq/FAQsec08.html">The IRAF FAQ on exporting</a> for the final image export<br />
3. <a href="http://iraf.noao.edu/iraf/ftp/iraf/docs/spect.ps.Z">User's Guide to reducing Slit Spectra with IRAF</a> for teaching me how to set reference spectra the hard way (for some reason, epar refspec wouldn't work and would trim out the imh from the reference spectrum image name. I don't know, it didn't seem to work for me.)<br />
There were a lot more that I can't remember / didn't bother to copy URLs of / that were random "Googlings".</p>
<p>It was fun reviving something that I learnt an year ago and finally getting satisfactory results!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Zelf de manier van aan- en verkoop van woningen bepalen via Livy.nl]]></title>
<link>http://woning.wordpress.com/?p=5</link>
<pubDate>Mon, 17 Mar 2008 13:12:30 +0000</pubDate>
<dc:creator>woning</dc:creator>
<guid>http://woning.wordpress.com/?p=5</guid>
<description><![CDATA[Woning kopen en verkopen vanaf EUR 0, vaste tarieven voor diensten van de NVM-makelaar
Livy.nl: zelf]]></description>
<content:encoded><![CDATA[<p>Woning kopen en verkopen vanaf EUR 0, vaste tarieven voor diensten van de NVM-makelaar</p>
<p>Livy.nl: zelf de manier van aan- en verkoop van je woning bepalen</p>
<p>Zelf doen op internet is hot. Tachtig procent van alle Nederlanders start de koop of verkoop van de eigen woning online. Toch blijft het meestal bij oriënteren op sites als Funda, Jaap of Marktplaats. Want de meeste mensen komen nog altijd bij een traditionele- of internetmakelaar terecht. Vanaf 1 februari kan het anders. Dan is het mogelijk om via Livy.nl zelf de manier van kopen en verkopen te bepalen. Met of zonder makelaar. Of: alleen de makelaar voor bepaalde diensten.<br />
Alles zelf doen en geld besparen. Zo veel mogelijk zelf doen en de makelaar alleen voor sommige zaken inschakelen. Kiezen voor zekerheid en alles aan de makelaar overlaten. Met Livy.nl bepaal je het zelf.</p>
<p><b>Geavanceerde tools</b><br />
Livy.nl maakt geavanceerde makelaarstools voor iedereen beschikbaar. Daarmee is het mogelijk om zelf een woningpresentatie samen te stellen. Compleet met foto's, video's, woninggegevens, persoonlijke tekst en uitleg. Ook krijgt Livy-gebruiker waardevolle tips en adviezen uit de makelaarswereld.</p>
<p><b>Persoonlijk dossier<br />
</b>Wanneer de woningpresentatie wordt gepubliceerd op internet, kan de woningverkoop beginnen: afspraken maken, bezichtigingen regelen, onderhandelen over de prijs en de overdracht organiseren. Alles wordt online bijgehouden in een persoonlijk dossier. Een woning kopen via Livy.nl verloopt via een vergelijkbaar stappenplan. Van het vinden van een woning tot en met de feitelijke overdracht.</p>
<p><b>Lokale NVM-makelaar<br />
</b>Hulp en ondersteuning van een lokale NVM-makelaar kan via Livy.nl direct worden geregeld. Bijvoorbeeld voor het vaststellen van de vraagprijs, hulp bij bezichtigingen, onderhandelingen en de afhandeling van de koopovereenkomst. Elke dienst heeft een vast tarief. Zo kan de Livy-gebruiker zelf bepalen waarvoor de makelaar wordt ingeschakeld.</p>
<p><b>Testfase in Almere afgerond<br />
</b>Vanaf oktober 2007 is Livy.nl uitgebreid getest in de regio Almere. Op basis van de feedback van gebruikers is het internetplatform continu aangepast en doorontwikkeld. Het resultaat hiervan wordt op 1 februari gelanceerd op <a href="http://www.livy.nl/">www.livy.nl</a>.</p>
<p><b>Initiatief van NVM-makelaars<br />
</b>Livy.nl is een initiatief van een groep Nederlandse NVM-makelaars. De dienstverlening richting de consument wordt gegarandeerd door een landelijk netwerk van aangesloten NVM-kantoren.</p>
<p><a href="http://www.livy.nl" title="Livy"><img src="http://woning.wordpress.com/files/2008/03/livy_advertentie_zoekertje.jpg" alt="Livyad" border="0" /></a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Opnieuw doorbraak in makelaarstarieven]]></title>
<link>http://woning.wordpress.com/?p=3</link>
<pubDate>Mon, 17 Mar 2008 12:33:04 +0000</pubDate>
<dc:creator>woning</dc:creator>
<guid>http://woning.wordpress.com/?p=3</guid>
<description><![CDATA[Consument kan via Livy.nl prijs terugbrengen tot nul euro
Opnieuw doorbraak in makelaarstarieven
ALM]]></description>
<content:encoded><![CDATA[<p>Consument kan via Livy.nl prijs terugbrengen tot nul euro<br />
Opnieuw doorbraak in makelaarstarieven</p>
<p>ALMERE - Consumenten die hun woning willen verkopen kunnen voortaan zelf makelaar spelen op de nieuwe website www.livy.nl. Als ze er niet uitkomen bij het taxeren van de woning, het regelen van bezichtigingen of het maken van foto's kunnen ze bij elke stap een NVM-makelaar inhuren. Door per geleverde dienst te betalen bepaalt de consument zelf het tarief van de makelaar.</p>
<p>Het is de eerste keer in Nederland dat makelaars de consument wegwijs maken in hun eigen werkwijze en geen totaaltarief, maar een tarief per geleverde dienst berekenen. Normaal gesproken betaalt de consument een percentage van de verkoopprijs of een vast tarief voor de makelaar.</p>
<p>De Stichting Livy in Almere is een initiatief van een groep NVM-makelaars. Dit jaar zullen 320 erkende makelaars zich aansluiten. Zij beseffen dat ze door de opkomst van woningverkopen via Internet veel klanten aan het verliezen zijn. Via Livy.nl bieden ze de consument de mogelijkheid via zelfwerkzaamheid geld te besparen, maar ook om op een simpele manier een makelaar in te schakelen.</p>
<p>Op de website biedt Livy.nl de consument eenvoudige zogeheten makelaarstools aan. Bijvoorbeeld om zelf een woningpresentatie te maken, compleet met foto's, video's, woninggegevens, persoonlijke tekst en uitleg. Ook krijgt de Livy-gebruiker tips en adviezen uit de makelaarswereld.</p>
<p>Via de website kan de consument in een persoonlijk dossier alle gegevens over de verkoop bijhouden, afspraken maken, bezichtigingen regelen, onderhandelen over de prijs en de overdracht organiseren. Een woning kopen via Livy.nl verloopt via een vergelijkbaar stappenplan. Van het vinden van een woning tot en met de feitelijke overdracht.</p>
<p>,,Andere websites verzamelen vaak een zo groot mogelijk aanbod aan woningen, maar je kunt er niet zomaar je huis op verkopen. Op onze website is alles transparant gemaakt. Je wordt door het hele proces begeleid. Je kunt zoveel mogelijk zelf doen en geld besparen of kiezen voor zekerheid en sommige zaken of alles aan de makelaar overlaten", legt Marc Kuipers van Livy het concept uit.</p>
<p>Uit een prijsvergelijking met andere websites waarop consumenten hun huis kunnen verkopen blijkt dat Livy.nl in alle gevallen goedkoper uitvalt voor de consument. Zelfs wanneer de consument kiest voor alle makelaarsdiensten.</p>
<p>Voor meer informatie: <a href="http://www.livy.nl" title="www.livy.nl">www.livy.nl</a></p>
<p><a href="http://www.livy.nl" title="Livy"><img src="http://woning.wordpress.com/files/2008/03/livy_advertentie_zoekertje.jpg" alt="Livyad" /></a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Processing Painter]]></title>
<link>http://codeanticode.wordpress.com/?p=12</link>
<pubDate>Mon, 04 Feb 2008 02:22:02 +0000</pubDate>
<dc:creator>codeanticode</dc:creator>
<guid>http://codeanticode.wordpress.com/?p=12</guid>
<description><![CDATA[I have been working since a while ago on a painter algorithm that uses GLSL shaders to handle a part]]></description>
<content:encoded><![CDATA[<p>I have been working since a while ago on a painter algorithm that uses <a href="http://en.wikipedia.org/wiki/GLSL">GLSL</a> shaders to handle a particle system in real time. The particles move on the screen, generating an effect that gives the impression of flowing paint. I implemented this algorithm in Processing, and the last week I finally managed to get some time to work on two optimizations to the original version of the algorithm: <a href="http://www.ozone3d.net/tutorials/vertex_displacement_mapping.php">texture displacement mapping</a> and <a href="http://www.ozone3d.net/tutorials/opengl_vbo.php">Vertex Buffer Objects</a>. With these two optimizations, the number of particles that can be displayed at a playable framerate goes from 10,000 up to 100,000.  Here is the link:</p>
<p><a href="http://users.design.ucla.edu/%7Eacolubri/shaders/painter.html">http://users.design.ucla.edu/%7Eacolubri/shaders/painter.html</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[VBO TIME = Major Discounts for you!!]]></title>
<link>http://gagavida.wordpress.com/2007/11/25/vbo-time-major-discounts-for-you/</link>
<pubDate>Sun, 25 Nov 2007 03:46:24 +0000</pubDate>
<dc:creator>GaGaVida</dc:creator>
<guid>http://gagavida.wordpress.com/2007/11/25/vbo-time-major-discounts-for-you/</guid>
<description><![CDATA[I just heard - can&#8217;t believe I amost missed it!  It&#8217;s the vintage blowout sale on eBay! ]]></description>
<content:encoded><![CDATA[<p><font color="#ff00ff"><b>I just heard - can't believe I amost missed it!  It's the vintage blowout sale on eBay!  Hurray!</b></font></p>
<p><font color="#ff00ff"><b>This means that if you go to eBay and just search, "VBO" - you will find an array of listings that are on sale and discounted like crazy!</b></font></p>
<p><b><font color="#ff00ff">VBO!  VBO!</font></b></p>
<p><a href="http://photobucket.com" target="_blank"><img src="http://i231.photobucket.com/albums/ee199/gagavida/blog/PinkFeathers66210.jpg" alt="Photo Sharing and Video Hosting at Photobucket" border="0" /></a></p>
]]></content:encoded>
</item>

</channel>
</rss>
