<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AncaA&#039;s tech journal &#187; OpenGL ES</title>
	<atom:link href="http://ancaa.eu/category/opengl-es/feed/" rel="self" type="application/rss+xml" />
	<link>http://ancaa.eu</link>
	<description></description>
	<lastBuildDate>Tue, 13 Jul 2010 10:01:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Useful tutorials for starting OpenGL development</title>
		<link>http://ancaa.eu/opengl/useful-tutorials-for-starting-opengl-development/</link>
		<comments>http://ancaa.eu/opengl/useful-tutorials-for-starting-opengl-development/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 09:10:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[openGLES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=49</guid>
		<description><![CDATA[Some very useful tutorials and demos that I&#8217;ve found about implementing OpenGL:

Nehe Tutorials
Zeus Tutorials
Public API Implementations
OpenGL  ES Implementations
Glut
Glut ES
GlUT Windows Libraries
GLUT on Windows

]]></description>
			<content:encoded><![CDATA[<p>Some very useful tutorials and demos that I&#8217;ve found about implementing OpenGL:
<ul>
<li><a href="http://nehe.gamedev.net/">Nehe Tutorials</a></li>
<li><a href="http://www.zeuscmd.com/tutorials/opengl/index.php">Zeus Tutorials</a></li>
<li><a href="http://www.khronos.org/developers/resources/">Public API Implementations</a></li>
<li><a href="http://www.khronos.org/developers/resources/opengles/">OpenGL  ES Implementations</a></li>
<li><a href="http://www.opengl.org/resources/libraries/glut/">Glut</a></li>
<li><a href="http://glutes.sourceforge.net/">Glut ES</a></li>
<li><a href="http://www.xmission.com/%7Enate/glut.html">GlUT Windows Libraries</a></li>
<li><a href="http://www.cs.csustan.edu/%7ersc/SDSU/GLUTinstall.html">GLUT on Windows</a></li>
<p></ul>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl/useful-tutorials-for-starting-opengl-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running an OpenGL ES application on Symbian Emulator and Phone from Visual Studio</title>
		<link>http://ancaa.eu/mobile-dev/running-an-opengl-es-application-on-symbian-emulator-and-phone-from-visual-studio/</link>
		<comments>http://ancaa.eu/mobile-dev/running-an-opengl-es-application-on-symbian-emulator-and-phone-from-visual-studio/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 02:34:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[Mobile Dev]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[Emulator]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=34</guid>
		<description><![CDATA[Today I wanted to test a little how the hardware acceleration is working in rendering 3D OpenGl ES applications on the Nokia N95. In order to do this I downloaded a sample 3D engine from the Nokia website.In order to run it on the emulator, I used Carbide VS 2005. The steps I followed were:
1. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to test a little how the hardware acceleration is working in rendering 3D OpenGl ES applications on the Nokia N95. <br />In order to do this I downloaded a <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/62c116a8-a373-4f2b-8e18-8fa53ce429b4/S60_Platform_3D_Game_Engine_Example_v1_1_en.zip.html">sample 3D engine</a> from the Nokia website.<br />In order to run it on the emulator, I used Carbide VS 2005. The steps I followed were:</p>
<p>1. Click <span style="font-style:italic;">File</span> -><span style="font-style:italic;">Import Symbian Project</span>.</p>
<p>2. In the dialog box that appears, as project file, specify the path to the <span style="font-weight:bold;">bld.inf<span style="font-style:italic;"></span></span> file of your project and select the project type from the drop down list below(in my case is Symbian 9) and click <span style="font-style:italic;">Next</span></p>
<p>3. In the Solution Settings dialog box select the SDK you want to use for your application(in my case S60 3.0 FP2). Here you can choose if you want your solution to be executed on the emulator(check the WINSCV checkbox) and on the phone(check the GCCE checkbox)</p>
<p>4. Click <span style="font-style:italic;">Finish</span>.</p>
<p>Now you can see all your project files included in a Visual Studio solution. In order to launch the application on the emulator just choose WINSCV configuration, like in the image below and run your application.</p>
<p><a href="http://picasaweb.google.com/anca.alimanescu/AncaA/photo?authkey=oHeUgoguMuY#5169417095592893154"><img src="http://lh4.google.com/anca.alimanescu/R711da6lWuI/AAAAAAAAFv0/z7bKfhJubpU/s400/chooseConfig.jpg" /></a></p>
<p>One problem I encountered, I don&#8217;t know if is normal or not, is the fact that the application is installed when you run the project from Visual Studio. The emulator is launched, but for a few seconds a white screen is displayed and after the main starting screen shows up. In order to launch the program I opened the <span style="font-style:italic;">Menu</span> folder -> <span style="font-style:italic;">Instalations</span> and I launched my application from there.</p>
<p><a href="http://picasaweb.google.com/anca.alimanescu/AncaA/photo?authkey=oHeUgoguMuY#5169419822897126130"><img src="http://lh3.google.com/anca.alimanescu/R7138K6lWvI/AAAAAAAAFv8/oll0AxKSJvA/s400/emulator.jpg" /></a></p>
<p>For running it on the phone, the GCCE configuration must be chosen and the solution launched. In order to communicate by USB cable with the phone, you will need to download the PC Suite from Nokia.The application will be installed on the phone but you will have to go as well in the <span style="font-style:italic;">Installed</span> folder to launch it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/mobile-dev/running-an-opengl-es-application-on-symbian-emulator-and-phone-from-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chasing the 3D hardware acceleration on mobile devices</title>
		<link>http://ancaa.eu/mobile-dev/chasing-the-3d-hardware-acceleration-on-mobile-devices/</link>
		<comments>http://ancaa.eu/mobile-dev/chasing-the-3d-hardware-acceleration-on-mobile-devices/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 05:20:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[Mobile Dev]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[Windos Mobile]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=32</guid>
		<description><![CDATA[As seen until now after finished with the basics of building a 3D application on the Windows Mobile platform, I started to notice the advantages and disadvantages on using OpenGL Es on Windows Mobile.  The available free implementations of OpenGL ES that I could find for Windows Mobile were only SW implementations and made [...]]]></description>
			<content:encoded><![CDATA[<p>As seen until now after finished with the basics of building a 3D application on the Windows Mobile platform, I started to notice the advantages and disadvantages on using OpenGL Es on Windows Mobile.  The available free implementations of OpenGL ES that I could find for Windows Mobile were only SW implementations and made no usage of the hardware acceleration of the graphic card. Doing some research I&#8217;ve found out that Nvidia might provides some implementations of OpenGL ES but this is only for their clients.<br />So, in order to start studying the posibility of using the 3D HW acceleration, I started looking deeper into what Nokia phone and especially the  <a href="http://en.wikipedia.org/wiki/Nokia_N95">Nokia N95</a> smartphone offers. <br />As it uses Symbian OS, I decided to have a look on how to start programming on Symbian using OpenGL ES. After a small research I saw that using OpenGL Es on Symbian was extremly well documented and explained.  <a href="http://anca.alimanescu.googlepages.com/Nokia_OpenGL-ES-Introduction.pdf">Here</a> is an overview of Nokia and OpenGL ES.</p>
<p>So, some few more start-up hints:</p>
<p>1. Some general things about <a href="http://en.wikipedia.org/wiki/Symbian_OS">Symbian</a>.</p>
<p>2. Some tools and SDKs for Symbian can be found on the <a href="http://developer.symbian.com/main/tools/sdks/"> Symbian Developer Network site</a>. As far as I have seen the SDKs are free but you have to register in order to use them. <br />For my Nokia N95 application I downloaded the S60 3rd Edition SDK. As IDE you can choose between: <br />      &#8211; <a href="http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide/index.html">Carbide C++</a> : based on the Eclipse platform. Comes in three &#8220;flavors&#8221;: Express, Developer and Proffesional. Only the Express version is free.<br />      &#8211; <a href="http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide/index.html">Carbide VS</a>, this is a plug-in for Visual Studio that allows you to develop C++ Symbian projects in Visual Studio 2005 and 2003. The <span style="font-weight:bold;">plugin</span> is free to download and use.<br />      &#8211; <a href="http://www.forum.nokia.com/main/resources/tools_and_sdks/codewarrior/">CodeWarrior IDE</a> that i think also needs a paied licence.<br />For Carbide and Carbide VS you have the emulator included.</p>
<p>3. <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/b64cafed-7e9a-4a69-a0e2-875857cfe5ea/OpenGL_ES_API_And_3D_Graphics_On_Symbian_OS_en.pdf.html">Information about 3D applications in Symbian devices</a>.</p>
<p>4. An implementation of OpenGL ES on Symbian for the desired platform. You can download it from <a href="http://www.imgtec.com/powervr/insider/Downloads/DocumentDownloads/index.asp?Page=PowerVRSDKs">here</a>. And <a href="http://www.imgtec.com/PowerVR/insider/toolsSDKs/index.asp?page=faq">here</a> you can see a list of questions that might help you a little more. After installing the SDK, you will notice it has included very good documentation, training courses and demos on how to start implementing OpenGL ES applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/mobile-dev/chasing-the-3d-hardware-acceleration-on-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D Mobile Rendering Using OpenGL ES presentation</title>
		<link>http://ancaa.eu/mobile-dev/3d-mobile-rendering-using-opengl-es-presentation/</link>
		<comments>http://ancaa.eu/mobile-dev/3d-mobile-rendering-using-opengl-es-presentation/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 16:39:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[Mobile Dev]]></category>
		<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=30</guid>
		<description><![CDATA[
For the PDF version click here.Soon I will add also the source code for the application I developed and give some hints about usefull tutorials!
]]></description>
			<content:encoded><![CDATA[<p><iframe src='http://docs.google.com/EmbedSlideshow?docid=dffsgghw_99jhftkfg' frameborder='0' width='410' height='342'></iframe></p>
<p>For the PDF version click <a href="http://anca.alimanescu.googlepages.com/Prezentare.pdf">here.</a><br />Soon I will add also the source code for the application I developed and give some hints about usefull tutorials!</p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/mobile-dev/3d-mobile-rendering-using-opengl-es-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitmapped fonts</title>
		<link>http://ancaa.eu/opengl-es/bitmapped-fonts/</link>
		<comments>http://ancaa.eu/opengl-es/bitmapped-fonts/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:08:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=28</guid>
		<description><![CDATA[Due to the fact that OpenGL ES does not provide any kind of fonts, we need think a way to create the characters and display them efficiently. In order to use fonts in OpenGL ES, we will use a widely used technique called: bitmapped fonts. That is, we store into a texture all characters of [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the fact that OpenGL ES does not provide any kind of fonts, we need think a way to create the characters and display them efficiently. In order to use fonts in OpenGL ES, we will use a widely used technique called: bitmapped fonts. That is, we store into a texture all characters of a font (there are many programs that produces this kind of textures). The texture will be black (0,0,0) in the places that we want it will be transparent (we will not render the whole quad, only the character inside), and white (1,1,1) in the places we want to see (the character itself). This will allow us, with a blend function of (GL_ONE, GL_ONE).</p>
<p>Because we have a white color, we can safely use glColor4x call to color our font.</p>
<p>Also, we need the right texture coordinates to isolate the right character in the texture, so we will precompute all texture coordinates for characters from 0 to 127 (our texture has 128 characters) in order to access directly to them in runtime, and draw a textured-blended-quad (actually, a triangle strip, because we do not have quads…).</p>
<p>So first we will create a suitable texture, with all characters that we will need. This texture has 8 rows and 16 columns, and each cell has 16×16 texels, and the characters are stored in the ASCII order. We need to isolate the texture coordinates of a character, so we do the next computations: <br /><code><br />const float rows = 8.0f;<br />const float columns = 16.0f;<br />const float xoffset = 1.0f / columns; <br />const float yoffset = 1.0f / rows; </p>
<p>const float cx = (float)(c % 16) * xoffset; <br />const float cy = (float)(c / 16) * yoffset;   <br /></code><br /> Where c is the ASCII code of the character we want to access, substracting 32, because in our texture we do not store the first 32 ASCII characters. cx and cy are the initial position, in both axis, of the character. With these two values we have the texture coordinates of the first corner of the quad.</p>
<p>The BitmappedFont class will encapsulate all this code:<br /><code><br />class BitmappedFont {</p>
<p>public:</p>
<p>BitmappedFont(GLuint textureFontID, int fontWidth = 15, int fontHeight = 15);<br />~BitmappedFont();<br />static void EnableStates(); //Begin Print<br />void Print(int x, int y, const char *fmt, ...);<br />static void DisableStates(); //EndPrint  </p>
<p>private:</p>
<p>GLuint m_textureFontID;<br />int m_fontWidth,m_fontHeight;  <br />//2 = st, 4 = vertices per character, 8 = rows, 16 = columns<br />static GLfixed m_textureCoordinates[2 * 4 * 8 * 16];<br />/*boolean to compute texture coordinates only when the first <br />  instance is created*/<br />static bool m_instanced;</p>
<p>}; <br /></code></p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl-es/bitmapped-fonts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Texture Loader</title>
		<link>http://ancaa.eu/opengl-es/texture-loader/</link>
		<comments>http://ancaa.eu/opengl-es/texture-loader/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:05:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=27</guid>
		<description><![CDATA[In order to load a texture we will use the following function :       bool LoadTexture(const char *fileName, GLuint *id)This function will receive a texture filename and a pointer to a texture identifier. This identifier will be initialized from inside the function (if proceed). It will return true if the [...]]]></description>
			<content:encoded><![CDATA[<p>In order to load a texture we will use the following function :<br /><code><br />       bool LoadTexture(const char *fileName, GLuint *id)<br /></code><br />This function will receive a texture filename and a pointer to a texture identifier. This identifier will be initialized from inside the function (if proceed). It will return true if the texture was successfully loaded, otherwise it will return false.</p>
<p>First we will read the texture file:<br /><code><br />bool LoadTexture(const char *fileName, GLuint *id) {</p>
<p>  FILE *f = fopen(fileName, "rb");<br />GLubyte *pixels = NULL;<br />if(!f) return false;</p>
<p>WORD width = 0, height = 0;   <br />byte headerLength = 0;     <br />byte imageType = 0;    <br />byte bits = 0;      <br />int format= 0;     <br />int lineWidth = 0;       </p>
<p>fread(&#038;headerLength, sizeof(byte), 1, f);  <br />//skip next byte<br />fseek(f,1,SEEK_CUR); </p>
<p>//read in the imageType (RLE, RGB, etc...)<br />fread(&#038;imageType, sizeof(byte), 1, f);</p>
<p>//skip information we don't care about<br />fseek(f, 9, SEEK_CUR); </p>
<p>/*read the width, height and bits per pixel (16, 24 or 32). We only <br />  will take care of 24 bits uncompressed TGAs*/<br />fread(&#038;width,  sizeof(WORD), 1, f);<br />fread(&#038;height, sizeof(WORD), 1, f);<br />fread(&#038;bits,   sizeof(byte), 1, f);</p>
<p>//move the file pointer to the pixel data<br />fseek(f, headerLength + 1, SEEK_CUR); </p>
<p>//check if the image is not compressed.<br />if(imageType != 10)<br />{<br />  //check if the image is a 24 <br />  if(bits == 24)<br />  {  <br />    /*Another (faster) way to divide between 8. We want to know the <br />      pixel size in bytes.*/<br />format = bits >> 3;<br />lineWidth = format * width;<br />    pixels = new GLubyte[lineWidth * height];<br />    //we are going to load the pixel data line by line<br />for(int y = 0; y < height; y++)<br />{<br />  //Read current line of pixels<br />  GLubyte *line = &#038;(pixels[lineWidth * y]);    <br />  fread(line, lineWidth, 1, f);<br />  /*Because the TGA is BGR instead of RGB, we must swap the R <br />        and G components (OGL ES does not have the           <br />        GL_BGR_EXT extension*/</p>
<p></code><br />Now we will create the OpenGL Texture:<br /><code><br />//Ask for a free texture name<br />glGenTextures(1, id); <br />/*first binding implies the texture object creation*/<br />glBindTexture(GL_TEXTURE_2D, *id); <br />/*Set texture properties: filtering and clamping modes*/<br />glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);<br />glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);<br />glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);<br />glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);<br />/*Upload pixels to the texture object*/<br />glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,<br />             GL_UNSIGNED_BYTE, pixels);  <br />/*Our copy in main main memory is no longer needed*/<br />delete [] pixels;  <br />return true;</p>
<p>}<br /></code><br />The texture will be loaded in the texture1 variable like this:<br /><code><br />       Gluint texture1 = 0;<br />       bool result = LoadTexture("texturename.tga",&#038;texture1);<br /></code></p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl-es/texture-loader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OBJ File Loader for OpenGL</title>
		<link>http://ancaa.eu/opengl/obj-file-loader-for-opengl/</link>
		<comments>http://ancaa.eu/opengl/obj-file-loader-for-opengl/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:03:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=26</guid>
		<description><![CDATA[In the followings a simple Obj File Loader using OpenGL ES will be described. For that, I used a structure to describe the mesh object:typedef struct _ObjMesh { ObjVertex *m_aVertexArray; ObjNormal *m_aNormalArray; ObjTexCoord *m_aTexCoordArray; ObjFace *m_aFaces;
unsigned long int *m_aIndices; unsigned long int m_iNumberOfVertices,
             [...]]]></description>
			<content:encoded><![CDATA[<p>In the followings a simple Obj File Loader using OpenGL ES will be described. For that, I used a structure to describe the mesh object:<br /><code><br />typedef struct _ObjMesh { ObjVertex *m_aVertexArray; ObjNormal *m_aNormalArray; ObjTexCoord *m_aTexCoordArray; ObjFace *m_aFaces;</p>
<p>unsigned long int *m_aIndices; unsigned long int m_iNumberOfVertices,</p>
<p>                      m_iNumberOfNormals,<br />                      m_iNumberOfTexCoords,<br />                      m_iNumberOfFaces;</p>
<p>struct _ObjMesh *m_pNext; ObjFile m_iMeshID; unsigned char m_iMode; unsigned long int m_iDisplayListNum; } ObjMesh;<br /></code><br />Each of the Vertices,Normals and Texture coordinates are also described in a structure:<br /><code><br />typedef struct {</p>
<p>float x,   /* The x component of the vertex position */<br />         y,   /* The y component of the vertex position */<br />  z;   /* The z component of the vertex position */</p>
<p>} ObjVertex;</p>
<p>typedef struct {</p>
<p>float x,   /* The x component of the normal vector */<br />  y,   /* The y component of the normal vector */<br />  z;   /* The z component of the normal vector */</p>
<p>} ObjNormal;</p>
<p>typedef struct {</p>
<p>float u,   /* The u parametric texturing co-ordinate */<br />               v;   /* The v parametric texturing co-ordinate */</p>
<p>} ObjTexCoord;<br /></code></p>
<p>In the source file, each row of the file will be read in the loadFile(”file.obj”) method and the values will be recorderd in the structure. In order to draw the shape the DrawObj() method will be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl/obj-file-loader-for-opengl/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>OBJ File Format &amp; OBJ File Loader</title>
		<link>http://ancaa.eu/opengl/obj-file-format-obj-file-loader/</link>
		<comments>http://ancaa.eu/opengl/obj-file-format-obj-file-loader/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:02:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=25</guid>
		<description><![CDATA[The OBJ file format is a text file format, which means you can edit OBJ files in a text editor if you are hard-core. Unfortunately, the original specification didn’t seem to state what the end of line character should be, so some tools use carriage-returns and some use linefeeds. You may have to convert the [...]]]></description>
			<content:encoded><![CDATA[<p>The OBJ file format is a text file format, which means you can edit OBJ files in a text editor if you are hard-core. Unfortunately, the original specification didn’t seem to state what the end of line character should be, so some tools use carriage-returns and some use linefeeds. You may have to convert the end of line characters depending on which tools you are reading the OBJ file in from. (Most notably the OBJIMP plugin for 3DS MAX will crash when reading in any of the OBJ files that shipped with Poser.) Also your Windows text editors may think the files are binary because of this.</p>
<p>The first character of each line specifies the type of command. If the first character is a pound sign, #, the line is a comment and the rest of the line is ignored. Any blank lines are also ignored. The file is read in by a tool and parsed from top to bottom just like you would read it. In the descriptions that follow, the first character is a command, followed by any arguments. Anything shown in square brackets is optional.</p>
<blockquote><p># a comment line</p></blockquote>
<p>These are always ignored. Usually the first line of every OBJ file will be a comment that says what program wrote the file out. Also, its quite common for comments to contain the number of verticies and/or faces an object used.</p>
<blockquote><p>v x y z</p></blockquote>
<p>The vertex command, this specifies a vertex by its three coordinates. The vertex is implicitly named by the order it is found in the file. For example, the first vertex in the file is referenced as ‘1’, the second as ‘2’ and so on. None of the vertex commands actually specify any geometry, they are just points in space.</p>
<blockquote><p>vt u v [w]</p></blockquote>
<p>The vertex texture command specifies the UV (and optionally W) mapping. These will be floating point values between 0 and 1 which say how to map the texture. They really don’t tell you anything by themselves, they must be grouped with a vertex in a ‘f’ face command.</p>
<blockquote><p>vn x y z
</p></blockquote>
<p>The vertex normal command specifies a normal vector. A lot of times these aren’t used, because the ‘f’ face command will use the order the ‘v’ commands are given to determine the normal instead. Like the ‘vt’ commands, they don’t mean anything until grouped with a vertex in the ‘f’ face command.</p>
<blockquote><p>f v1[/vt1][/vn1] v2[/vt2][/vn2] v3[/vt3][/vn3] &#8230;</p></blockquote>
<p>The face command specifies a polygon made from the verticies listed. You may have as many verticies as you like. To reference a vertex you just give its index in the file, for example ‘f 54 55 56 57’ means a face built from vertecies 54 &#8211; 57. For each vertex, there may also be an associated vt, which says how to map the texture at this point, and/or a vn, which specifies a normal at this point. If you specify a vt or vn for one vertex, you must specify one for all. If you want to have a vertex and a vertex normal, but no vertex texture, it will look like: ‘f v1//vt1’. The normal is what tells it which way the polygon faces. If you don’t give one, it is determined by the order the verticies are given. They are assumed to be in counter-clockwise direction. If you aren’t using vn’s to specify the normal and you wanted to ‘flip the normal’ you would reverse the order of the verticies. In most 3D programs, if the normal points the wrong way, there will appear to be a hole in the object. g name</p>
<p>The group name command specifies a sub-object grouping. All ‘f’ face commands that follow are considered to be in the same group.</p>
<p>usemtl name</p>
<p>The use material command lets you name a material to use. All ‘f’ face commands that follow will use the same material, until another usemtl command is encountered. For all of the Poser OBJ files I’ve seen, all ‘g’ commands should be followed by a ‘usemtl’ command.</p>
<p>Remember that for verticies, they can be interspersed throughout the file, only the order they appear makes a difference. The faces can also be spread throughout the file, except they must follow the verticies they use (I think), and they will be part of whichever group and/or material they follow. That said, most OBJ files follow a consistant layout. Now the ‘normal’ layout of the file will be:</p>
<p># comment about what application generated this file. # all of the ‘v’ commands will be listed v x y z v &#8230; # all of the ‘vn’ commands will be listed, although most Poser OBJ files # do not use the ‘vn’ commands vn x y z vn &#8230; # all of the ‘vt’ commands will be listed vt x y z vt &#8230; # the object and its material will be set g object usemtl material # all of the ‘f’ commands are listed f 1/1 2/2 3/3 4/4 f &#8230;.</p>
<p>Additional Items:</p>
<p>If you had two OBJ files and wanted to merge them, you can cut all the ‘v’, ‘vt’, and ‘vn’ commands from the second file and paste them at the end of the first. However, you cannot just copy over the ‘f’ commands, because they will have to have all their verticies offset. I’m thinking there has to be a tool out there somewhere that will do this for you, but I don’t know of any.</p>
<p>Hair objects with separate pieces like the ponytails that have a hairtie that can be colored separately, are actually a single group. They use additional usemtl commands to perform their magic. You can setup the additional material parameters in the .hr2 file (MAC). Example OBJ:</p>
<blockquote><p>v x y z v &#8230; g hair usemtl hair f 1 2 3 4 f &#8230; # there is NOT another g command here usemtl hairTie f 10 11 12 13 f &#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl/obj-file-format-obj-file-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D Tree on the Pocket PC</title>
		<link>http://ancaa.eu/mobile-dev/3d-tree-on-the-pocket-pc/</link>
		<comments>http://ancaa.eu/mobile-dev/3d-tree-on-the-pocket-pc/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 17:38:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[Mobile Dev]]></category>
		<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=23</guid>
		<description><![CDATA[&#160;I loaded the tree using a mesh from a file and used OpenGL to render it. Soon I will put also some code samples used for loading the file and using OpenGL Es. Also I will add some performance statistics related to the execution of a 3D application using OpenGL.

]]></description>
			<content:encoded><![CDATA[<p><a HREF='http://bp0.blogger.com/_MBRd7tNOK4I/R4zvpYqJn3I/AAAAAAAAE-w/fTX2x69gdIM/s1600-h/myTree.jpg'><img SRC='http://bp0.blogger.com/_MBRd7tNOK4I/R4zvpYqJn3I/AAAAAAAAE-w/fTX2x69gdIM/s320/myTree.jpg' border=0 alt='' id='BLOGGER_PHOTO_ID_' ></a>&nbsp;<br /><a href="http://picasaweb.google.com/anca.alimanescu/AncaA/photo?authkey=oHeUgoguMuY#5156143666062532482"><img src="http://lh4.google.com/anca.alimanescu/R45NWIqJn4I/AAAAAAAAE_Q/aGLERTGKZnc/s400/myForrest.jpg" /></a><br />I loaded the tree using a mesh from a file and used OpenGL to render it. Soon I will put also some code samples used for loading the file and using OpenGL Es. Also I will add some performance statistics related to the execution of a 3D application using OpenGL.
<div style='clear:both; text-align:NONE'><a href='http://picasa.google.com/blogger/' target='ext'><img src='http://photos1.blogger.com/pbp.gif' alt='Posted by Picasa' style='border: 0px none ; padding: 0px; background: transparent none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;' align='middle' border='0' /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/mobile-dev/3d-tree-on-the-pocket-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up the environment for using OpenGL ES with Visual Studio 2005 in Pocket Pc Development</title>
		<link>http://ancaa.eu/opengl-es/setting-up-the-environment-for-using-opengl-es-with-visual-studio-2005-in-pocket-pc-development/</link>
		<comments>http://ancaa.eu/opengl-es/setting-up-the-environment-for-using-opengl-es-with-visual-studio-2005-in-pocket-pc-development/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 17:04:00 +0000</pubDate>
		<dc:creator>Anca Alimanescu</dc:creator>
				<category><![CDATA[OpenGL ES]]></category>

		<guid isPermaLink="false">http://aanca.com/?p=20</guid>
		<description><![CDATA[In order to start the development of an Open GL ES application for the Pocket PC we will need the following:
1.An OpenGL ES implementation(Vincent Mobile 3D Rendering Library,Hybrid’s “Rasteroid” Implementation etc.) 2.Visual Studio 2005 Standard Edition(at least) as it contains the emulator and template projects for mobile development. 3.Pocket PC 2003 SDK.
In the following I [...]]]></description>
			<content:encoded><![CDATA[<p>In order to start the development of an Open GL ES application for the Pocket PC we will need the following:</p>
<p>1.An OpenGL ES implementation(Vincent Mobile 3D Rendering Library,Hybrid’s “Rasteroid” Implementation etc.) 2.Visual Studio 2005 Standard Edition(at least) as it contains the emulator and template projects for mobile development. 3.Pocket PC 2003 SDK.</p>
<p>In the following I am going to present you the steps needed to create an PocketPC application, on VSTO 2005, using OpenGL ES(Vincent implementation).</p>
<p>Steps on setting up the application:</p>
<p>1.Download the Vincent implementation library for Windows.</p>
<p>2.Unzip it and copy the header files and the library files in the Visual Studio directory <span style="font-family: courier new;">Microsoft Visual Studio 8\SmartDevices\SDK\PocketPC2003\Include\ and Microsoft Visual Studio 8\SmartDevices\SDK\PocketPC2003\Lib\armv4</span>, in the Pocket PC SDK. Make sure that in the Include folder you create a subfolder named GLES for example, where you include the header files located in the <span style="font-family: courier new;">\include\GLES</span> from the Vincent library. In the library <span style="font-family: courier new;">Studio 8\SmartDevices\SDK\PocketPC2003\Lib\armv4</span> copy the content of the <span style="font-family: courier new;">\bin\arm\Release folder</span>.</p>
<p>3.Open Visual Studio 2005 and click <span style="font-family: courier new;">File→ Create new project</span>. Choose Visual C++ as programming language and select the Smart Device menu. From the project templates available choose Project Smart Device Win32 template. If you want to use Glut ES in implementing your project, you will specify in the wizard that you want a Win32 Console application. If you want to use just OpenGL ES you will choose a Win32 Windows application.</p>
<p>4.In the header file of the main cpp file make sure to include the OpenGl ES headers:</p>
<p><span style="font-family: courier new;">#include GLES/gl.h</span><br /><span style="font-family: courier new;">#include GLES/egl.h</span></p>
<p>If you are using Glut Es make sure to add the</p>
<p><span style="font-family: courier new;">#include GLES/glutes.h</span></p>
<p>You should now link the project as well to the Glut Es library by cliking <span style="font-family: courier new;">Project→ Project Properties→Configuration Properties→Linker→Command line</span>. In the Command line here make sure to add glutes.lib library.</p>
<p>5.In order to test the project on the Pocket PC emulator, first you have to copy the libGLES_CM.dll file from the Vincent library in the Windows directory of the emulator(the same thing must be done for the mobile device). If you are using Glut ES, make sure to copy the glutes.dll file to the Windows directory of the emulator/pocket pc.</p>
<p>6.When launching the application you can run it either on the emulator or directy on the mobile device.</p>
]]></content:encoded>
			<wfw:commentRss>http://ancaa.eu/opengl-es/setting-up-the-environment-for-using-opengl-es-with-visual-studio-2005-in-pocket-pc-development/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
