Search Results

Search found 9 results on 1 pages for 'nornagon'.

Page 1/1 | 1 

  • glFramebufferTexture2D performance

    - by nornagon
    I'm doing heavy computation using the GPU, which involves a lot of render-to-texture operations. It's an iterative computation, so there's a lot of rendering to a texture, then rendering that texture to another texture, then rendering the second texture back to the first texture and so on, passing the texture through a shader each time. My question is: is it better to have a separate FBO for each texture I want to render into, or should I rather have one FBO and bind the target texture using glFramebufferTexture2D each time I want to change render target? My platform is OpenGL ES 2.0 on the iPhone.

    Read the article

  • Execute a function when a <link> element has finished loading

    - by nornagon
    I'm using jQuery Masonry to lay out my page, but I'm using a custom @font-face font. The problem being that Masonry doesn't know the metrics of the font until it's loaded. The Masonry docs suggest that you use $(window).load() instead of $(document).ready() to call the layout functions, but I don't want to have to wait until all the images etc. load. I can specify the dimensions of the images exactly, so Masonry doesn't need to wait until they're loaded. It's just the text that's the problem. How can I get jQuery to call a callback when the <link> element that links in the font finishes loading?

    Read the article

  • Why is it still so hard to write software?

    - by nornagon
    Writing software, I find, is composed of two parts: the Idea, and the Implementation. The Idea is about thinking: "I have this problem; how do I solve it?" and further, "how do I solve it elegantly?" The answers to these questions are obtainable by thinking about algorithms and architecture. The ideas come partially through analysis and partially through insight and intuition. The Idea is usually the easy part. You talk to your friends and co-workers and you nut it out in a meeting or over coffee. It takes an hour or two, plus revisions as you implement and find new problems. The Implementation phase of software development is so difficult that we joke about it. "Oh," we say, "the rest is a Simple Matter of Code." Because it should be simple, but it never is. We used to write our code on punch cards, and that was hard: mistakes were very difficult to spot, so we had to spend extra effort making sure every line was perfect. Then we had serial terminals: we could see all our code at once, search through it, organise it hierarchically and create things abstracted from raw machine code. First we had assemblers, one level up from machine code. Mnemonics freed us from remembering the machine code. Then we had compilers, which freed us from remembering the instructions. We had virtual machines, which let us step away from machine-specific details. And now we have advanced tools like Eclipse and Xcode that perform analysis on our code to help us write code faster and avoid common pitfalls. But writing code is still hard. Writing code is about understanding large, complex systems, and tools we have today simply don't go very far to help us with that. When I click "find all references" in Eclipse, I get a list of them at the bottom of the window. I click on one, and I'm torn away from what I was looking at, forced to context switch. Java architecture is usually several levels deep, so I have to switch and switch and switch until I find what I'm really looking for -- by which time I've forgotten where I came from. And I do that all day until I've understood a system. It's taxing mentally, and Eclipse doesn't do much that couldn't be done in 1985 with grep, except eat hundreds of megs of RAM. Writing code has barely changed since we were staring at amber on black. We have the theoretical groundwork for much more advanced tools, tools that actually work to help us comprehend and extend the complex systems we work with every day. So why is writing code still so hard?

    Read the article

  • Merge overlapping triangles into a polygon

    - by nornagon
    I've got a bunch of overlapping triangles from a 3D model projected into a 2D plane. I need to merge each island of touching triangles into a closed, non-convex polygon. The resultant polygons shouldn't have any holes in them (since the source data doesn't). Many of the source triangles share (floating point identical) edges with other triangles in the source data. What's the easiest way to do this? Performance isn't particularly important, since this will be done at design time.

    Read the article

  • How can I get a custom UITableView to automatically scroll to a selected text field?

    - by nornagon
    I have a UITableView, which I am controlling from a custom UIViewController. When the user clicks the 'add' button, I add a row to the UITableView with a text field in it, and make it the first responder. The problem is, when the bottom of the table is out of view (or hidden by the keyboard), the UITableView doesn't scroll to bring the text field into view. UITableViewController does this automatically, but my View Controller can't be a subclass of UITableViewController.

    Read the article

  • Generate 2D cross-section polygon from 3D mesh

    - by nornagon
    I'm writing a game which uses 3D models to draw a scene (top-down orthographic projection), but a 2D physics engine to calculate response to collisions, etc. I have a few 3D assets for which I'd like to be able to automatically generate a hitbox by 'slicing' the 3D mesh with the X-Y plane and creating a polygon from the resultant edges. Google is failing me on this one (and not much helpful material on SO either). Suggestions?

    Read the article

  • Developing and deploying games for Windows, Mac (& Linux)

    - by nornagon
    I want to write games that run on all the major platforms. I also want people to be able to play them by downloading a file and double clicking it. That means a single .exe/.app file. I'm happy to use OpenGL directly for graphics. What I don't know how to do is show a window, handle mouse/keyboard input and play sounds in a cross-platform manner. I don't really mind what the underlying language is, as long as it isn't C++ or Java. C#, Ruby or Python would be preferable, in that order :) Please, SO, save me from having to write Flash games!

    Read the article

1