Sunset Lake Software - Comments for "Lessons from Molecules: OpenGL ES" http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es Comments for "Lessons from Molecules: OpenGL ES" en If you want just the basics http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-1097 <p>If you want just the basics for setting up an OpenGL ES scene, it's hard to beat starting an application using Apple's OpenGL ES Application template in Xcode. This will give you boilerplate code and a working UIView that hosts OpenGL ES content. You can expand upon it from there.</p> <p>For a slightly more detailed example of a rotating cube, you can look at the <a href="http://www.sunsetlakesoftware.com/sites/default/files/CubeExample.zip" rel="nofollow">source code for a sample I constructed</a> for the OpenGL ES 2.0 session of <a href="http://deimos.apple.com/WebObjects/Core.woa/Browse/matcmadison.edu.3989485784.04638434143" rel="nofollow">my iTunes U course</a>.</p> pubDate Thu, 13 Oct 2011 15:11:57 +0000 dc:creator Brad Larson guid false comment 1097 at http://www.sunsetlakesoftware.com I am trying to make a simple http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-1096 <p>I am trying to make a simple 3D dice rolling application for the iPhone, which will not be released to the public because of my terrible inexperience. For some reason, I cannot seem to make my UIView subclass draw anything at all. In addition, I would like the view to have a clear background. Could you please point me to a simple guide that has ONLY the code needed? I am very good with C and Objective-c, so I can easily pick OpenGL apart and see what everything does. My problem is that I cannot find the full code, and I can only get drawing info for OS X.</p> pubDate Wed, 12 Oct 2011 20:25:33 +0000 dc:creator Justin guid false comment 1096 at http://www.sunsetlakesoftware.com I am sorry for confusing you http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-1011 <p>I am sorry for confusing you Brad. I am referring to your cube example application to develop an sample application similar to rubik's cube puzzle (which has 3x3 matrix). I am new to openGL. so, can you guide me(with logic / source code) on how to draw a 3x3 square matrix over your cube example please?</p> pubDate Mon, 06 Jun 2011 07:06:28 +0000 dc:creator Narain guid false comment 1011 at http://www.sunsetlakesoftware.com Um, Molecules is an iPhone / http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-1009 <p>Um, Molecules is an iPhone / iPad application, not a Mac application. There isn't any Mac code here in anything that I'm talking about. All of this is for iOS.</p> pubDate Thu, 02 Jun 2011 11:58:34 +0000 dc:creator Brad Larson guid false comment 1009 at http://www.sunsetlakesoftware.com Hey Brad, Great Tutorial. I http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-1008 <p>Hey Brad, Great Tutorial. I am trying to create the same puzzle game using iphone sdk. Is there a way I can port your code to iphone SDK? You have it for Mac OSX. Please correct me if I am wrong somewhere.</p> pubDate Thu, 02 Jun 2011 10:31:13 +0000 dc:creator Narain guid false comment 1008 at http://www.sunsetlakesoftware.com Really a nice tutorial :) http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-886 <p><strong> Really a nice tutorial :) </strong></p> pubDate Mon, 17 Jan 2011 06:18:11 +0000 dc:creator Anonymous guid false comment 886 at http://www.sunsetlakesoftware.com Brad, Thanks for all the http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-825 <p>Brad,<br /> Thanks for all the tips. Great stuff! In your sample application, CubeExample, can you help me understand how to convert the glOrtho to glFrustum. I just substituted them with each other and it compiled and ran but the rotating of the cube was wacky. It was diamond shapped and just a bit weird. I figured it had to do with the CATransform3D being optimized for Ortho but I can't figure out how to make everything rotate correctly. Any advice would be very helpful. Thanks.</p> pubDate Sun, 17 Oct 2010 03:04:14 +0000 dc:creator Darren guid false comment 825 at http://www.sunsetlakesoftware.com Yet another big *thank you* http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-780 <p>Yet another big *thank you* for posting these tutorials!</p> pubDate Sun, 22 Aug 2010 06:55:12 +0000 dc:creator Boyd Waters guid false comment 780 at http://www.sunsetlakesoftware.com I'm not sure what you are http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-779 <p>I'm not sure what you are asking. The rotation of the model occurs relative to the user, When they move their finger left, it rotates in that direction about an imaginary Y axis that is parallel to the screen (note: left and right directions appear to be reversed in my cube example). Likewise, when they move their finger up, the model rotates about an imaginary X axis that is parallel to the screen. </p> <p>This is simpler than a trackball-style rotation, and I personally prefer it to that rotation style. I accomplish this using matrix manipulation like you describe above, which adjusts the rotation for the current model view matrix coordinate system.</p> pubDate Thu, 12 Aug 2010 13:43:08 +0000 dc:creator Brad Larson guid false comment 779 at http://www.sunsetlakesoftware.com What compilation errors are http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es#comment-778 <p>What compilation errors are you seeing? The application was developed using the latest iOS 4.0 SDK, and it compiles just fine on my system using the latest SDK and Xcode 3.2.3. All of my students used it just fine last semester.</p> <p>As far as not using glRotate(), yes that is an optimization that I implemented later on. See <a href="http://www.sunsetlakesoftware.com/2009/01/13/opengl-es-catransform3d" rel="nofollow">this</a> for more. I use the internal rotation functions from Core Animation to generate the appropriate matrix, then apply that to the model view matrix. This saves a couple of matrix reads that were halting the rendering pipeline.</p> pubDate Thu, 12 Aug 2010 13:34:19 +0000 dc:creator Brad Larson guid false comment 778 at http://www.sunsetlakesoftware.com