Search Results

Search found 324 results on 13 pages for 'joseph reeves'.

Page 2/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How can a non-technical person learn to write a spec for small projects?

    - by Joseph Turian
    How can a non-technical person learn to write specs for small projects? A friend of mine is trying to outsource some development on a statistics project. In particular, he does a lot of work in excel, and wants to outsource the creation of scripts to do what he now does by hand. However, my friend is extremely non-technical. He is poor at writing technical specs. When he does write a spec, it is written the way you would describe doing something in excel (go to this cell and then copy the value to that cell). It is also overly verbose, and does examples several times. I'm not sure if he properly describes corner cases. The first project he outsourced was a failure. I think he overdescribed some details, but underdescribed corner cases. That and/or the coder he hired didn't think through the corner cases and ask appropriate questions. I'm not sure. I got on IM with him and it took me half an hour to dig out a description that should have taken five minutes or less to describe. I wrote the scripts for him at the end, but didn't examine why his process with the coder failed. He has asked me for help. However, I refuse to get involved, because taking his spec and translating it into clear requirements is 10x more work than executing on a clearly written spec. What is the right way for him to learn? Are there resources he could use? Are there ways he can learn from small, low-pressure practice projects with coders? Most of his scripts are statistical and data processing oriented. e.g. take this column and run an average over it. Remove these rows under these conditions. So the challenge is different than spec'ing a web app.

    Read the article

  • How to attach turrets to tiles in a tile based game

    - by Joseph St. Pierre
    I am a flash developer, and I am building a Tower Defense game. The world is being built through tiles, and I have gotten that accomplished easily. I have also gotten level changes and enemy spawning down as well. However, I wish the player to be able to spawn turrets, and have those turrets be on specific tiles, based upon where the player placed it. Here is my code: stop(); colOffset = 50; rowOffset = 50; guns = []; placed = true; dead = 0; spawned = 0; level = 1; interval = 350 / level; amount = level * 20; counter = 0; numCol = 14; numRow = 10; tiles = []; k = 0; create = false; tileName = new Array("road","grass","end", "start"); board = new Array( new Array(1,1,1,1,3,1,1,1,1,1,2,1,1,1), new Array(1,1,1,0,0,1,1,1,1,1,0,1,1,1), new Array(1,1,1,0,1,1,1,1,1,1,0,0,1,1), new Array(1,1,1,0,0,0,1,1,1,1,1,0,1,1), new Array(1,1,1,0,1,0,0,0,1,1,1,0,0,1), new Array(1,1,1,0,1,1,1,0,0,1,1,1,0,1), new Array(1,1,0,0,1,1,1,1,0,1,1,0,0,1), new Array(1,1,0,1,1,1,1,1,0,1,0,0,1,1), new Array(1,1,0,0,0,0,0,0,0,1,0,1,1,1), new Array(1,1,1,1,1,1,1,1,0,0,0,1,1,1) ); buildBoard(); function buildBoard(){ for ( col = 0; col < numCol; col++){ for ( row = 0; row < numRow; row++){ _root.attachMovie("tile", "tile_" + col + "_" + row, _root.getNextHighestDepth()); theTile = eval("tile_" + col + "_" + row); theTile._x = (col * 50); theTile._y = (row * 50); theTile.row = row; theTile.col = col; tileType = board[row][col]; theTile.gotoAndStop(tileName[tileType]); tiles.push(theTile); } } } init(); function init(){ onEnterFrame = function(){ counter += 1; if ( spawned < amount && counter > 50){ min= _root.attachMovie("minion","minion",_root.getNextHighestDepth()); min._x = tile_4_0._x + 25; min._y = tile_4_0._y + 25; min.health = 100; choose = Math.round(Math.random()); if ( choose == 0 ){ min.waypointX = [ tile_4_1._x +25, tile_3_1._x + 25, tile_3_2._x + 25, tile_3_6._x + 25, tile_2_6._x + 25, tile_2_8._x + 25, tile_8_8._x + 25, tile_8_9._x + 25, tile_10_9._x + 25, tile_10_7._x + 25, tile_11_7._x + 25, tile_11_6._x + 25, tile_12_6._x + 25, tile_12_4._x + 25, tile_11_4._x + 25, tile_11_2._x + 25, tile_10_2._x + 25, tile_10_0._x + 25]; min.waypointY = [ tile_4_1._y +25, tile_3_1._y + 25, tile_3_2._y + 25, tile_3_6._y + 25, tile_2_6._y + 25, tile_2_8._y + 25, tile_8_8._y + 25, tile_8_9._y + 25, tile_10_9._y + 25, tile_10_7._y + 25, tile_11_7._y + 25, tile_11_6._y + 25, tile_12_6._y + 25, tile_12_4._y + 25, tile_11_4._y + 25, tile_11_2._y + 25, tile_10_2._y + 25, tile_10_0._y + 25]; } else if ( choose == 1 ){ min.waypointX = [ tile_4_1._x +25, tile_3_1._x + 25, tile_3_2._x + 25, tile_3_3._x + 25, tile_5_3._x + 25, tile_5_4._x + 25, tile_7_4._x + 25, tile_7_5._x + 25, tile_8_5._x + 25, tile_8_8._x + 25, tile_8_9._x + 25, tile_10_9._x + 25, tile_10_7._x + 25, tile_11_7._x + 25, tile_11_6._x + 25, tile_12_6._x + 25, tile_12_4._x + 25, tile_11_4._x + 25, tile_11_2._x + 25, tile_10_2._x + 25, tile_10_0._x + 25 ]; min.waypointY = [ tile_4_1._y +25, tile_3_1._y + 25, tile_3_2._y + 25, tile_3_3._y + 25, tile_5_3._y + 25, tile_5_4._y + 25, tile_7_4._y + 25, tile_7_5._y + 25, tile_8_5._y + 25, tile_8_8._y + 25, tile_8_9._y + 25, tile_10_9._y + 25, tile_10_7._y + 25, tile_11_7._y + 25, tile_11_6._y + 25, tile_12_6._y + 25, tile_12_4._y + 25, tile_11_4._y + 25, tile_11_2._y + 25, tile_10_2._y + 25, tile_10_0._y + 25 ]; } min.i = 0; counter = 0; spawned += 1; min.onEnterFrame = function(){ dx = this.waypointX[this.i] - this._x; dy = this.waypointY[this.i] - this._y; radians = Math.atan2(dy,dx); degrees = radians * 180 / Math.PI; xspeed = Math.cos(radians); yspeed = Math.sin(radians); this._x += xspeed; this._y += yspeed; if( this._x == this.waypointX[this.i] && this._y == this.waypointY[this.i]){ this.i++; } if ( this._x == tile_10_0._x + 25 && this._y == tile_10_0._y + 25){ this.removeMovieClip(); dead += 1; } } } if ( dead >= amount ){ dead = 0; level += 1; amount = level * 20; spawned = 0; } } btnM.onRelease = function(){ create = true; } } game.onEnterFrame = function(){ } It is possible for me however to complete this task, but only once. I am able to make the turret, drag it over to a tile, and have it attach itself to the tile. No problem. The issue is, I cannot do these multiple times. Please Help.

    Read the article

  • Is there an alternative Skype client?

    - by Joseph
    I love Ubuntu, but one thing I think is a pain is skype for it. It's outdated, buggy and generally just not as smooth as a lot of the other Ubuntu software. Is there an alternative for it? I'm not speaking about another IM like AIM or Live Messenger. Put another piece of software like the native app that comes with Ubuntu, that allows me to sign into Skype as well? Or is there perhaps a plugin for the native Ubuntu chat app that allows Skype contacts, calling etc. etc.

    Read the article

  • Refactoring this code that produces a reverse-lookup hash from another hash

    - by Frank Joseph Mattia
    This code is based on the idea of a Form Object http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/ (see #3 if unfamiliar with the concept). My actual code in question may be found here: https://gist.github.com/frankjmattia/82a9945f30bde29eba88 The code takes a hash of objects/attributes and creates a reverse lookup hash to keep track of their delegations to do this. delegate :first_name, :email, to: :user, prefix: true But I am manually creating the delegations from a hash like this: DELEGATIONS = { user: [ :first_name, :email ] } At runtime when I want to look up the translated attribute names for the objects, all I have to go on are the delegated/prefixed (have to use a prefix to avoid naming collisions) attribute names like :user_first_name which aren't in sync with the rails i18n way of doing it: en: activerecord: attributes: user: email: 'Email Address' The code I have take the above delegations hash and turns it into a lookup table so when I override human_attribute_name I can get back the original attribute name and its class. Then I send #human_attribute_name to the original class with the original attribute name as its argument. The code I've come up with works but it is ugly to say the least. I've never really used #inject so this was a crash course for me and am quite unsure if this code effective way of solving my problem. Could someone recommend a simpler solution that does not require a reverse lookup table or does that seem like the right way to go? Thanks, - FJM

    Read the article

  • Why is CSS3 doing animations?

    - by Joseph the Dreamer
    Like what the title says, why are there animations in CSS3? With basis from the "rule" of separation of concerns, HTML is the content, CSS is the style, and JavaScript is the interactive component. And by interactivity, one can conclude that anything moving due to any interaction, user or non-user triggered should be covered by JavaScript, not CSS. So why did they make CSS3 capable of doing animations? Doesn't it breach the rule, which is separation of concerns? Is there anything I missed that makes animations qualified to be classified as styles rather than interaction?

    Read the article

  • Does this BSD-like license achieve what I want it to?

    - by Joseph Szymborski
    I was wondering if this license is: self defeating just a clone of an existing, better established license practical any more "corporate-friendly" than the GPL too vague/open ended and finally, if there is a better license that achieves a similar effect? I wanted a license that would (in simple terms) be as flexible/simple as the "Simplified BSD" license (which is essentially the MIT license) allow anyone to make modifications as long as I'm attributed require that I get a notification that such a derived work exists require that I have access to the source code and be given license to use the code not oblige the author of the derivative work to have to release the source code to the general public not oblige the author of the derivative work to license the derivative work under a specific license Here is the proposed license, which is just the simplified BSD with a couple of additional clauses (all of which are bolded). Copyright (c) (year), (author) (email) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The copyright holder(s) must be notified of any redistributions of source code. The copyright holder(s) must be notified of any redistributions in binary form The copyright holder(s) must be granted access to the source code and/or the binary form of any redistribution upon the copyright holder's request. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Read the article

  • Programmatically syncing with remote servers

    - by Joseph
    My application generates text files that need to be synced with remote servers, which may be windows or linux. Sync has to happen without user's intervention. I tried with rsync but windows doesn't come with rsync by default. Also it is not possible to supply password in the command line for rsync. Currently I'm going with ftp. But that seems like an inefficient way. Is there a way to rsync without user intervention? What are the ways to sync with a remote server programmatically? App is on nodejs.

    Read the article

  • Windows Server 2008 in KVM

    - by Joseph
    I've been working on getting a Windows Server 2008 KVM in my linux box running Ubuntu Server 12.04. I've got virt-install and virt-manager installed, got the install up and running via virt-install --connect qemu:///system -n winsvr2008 -r 1024 --vcpus=1 --disk path=/home/pwnd/vm/2008.img,size=30 -c /home/pwnd/en_windows_server_2008_with_sp2_x86_dvd_342333.iso --graphics vnc,listen=192.168.1.127 --noautoconsole --os-type=windows --os-variant=win2k8 --network=bridge:virbr0 --hvm -v and virsh vncdisplay winsvr2008 I can connect and view, but upon starting, I get hung up on please wait right after clicking Install. Any ideas?

    Read the article

  • Maintaining Two Separate Software Versions From the Same Codebase in Version Control

    - by Joseph
    Let's say that I am writing two different versions of the same software/program/app/script and storing them under version control. The first version is a free "Basic" version, while the second is a paid "Premium" version that takes the codebase of the free version and expands upon it with a few extra value-added features. Any new patches, fixes, or features need to find their way into both versions. I am currently considering using master and develop branches for the main codebase (free version) along side master-premium and develop-premium branches for the paid version. When a change is made to the free version and merged to the master branch (after thorough testing on develop of course), it gets copied over to the develop-premium branch via the cherry-pick command for more testing and then merged into master-premium. Is this the best workflow to handle this situation? Are there any potential problems, caveats, or pitfalls to be aware of? Is there a better branching strategy than what I have already come up with? Your feedback is highly appreciated! P.S. This is for a PHP script stored in Git, but the answers should apply to any language or VCS.

    Read the article

  • I cannot see the drives on my computer

    - by Joseph
    I'm a new Ubuntu user and I installed this Ubuntu 12.04 fromn a usb stick. It all went fine(I think) but as I notice, there are no drives shown on the menu. I tried some command in the terminal to see if the drives are available and yes, they are available. My problem is how to make these drives show up on the menu above. Sorry if this question is somewhat vague. (I removed the image because I am not allowed to add an image because I have insufficient reputation)

    Read the article

  • Algorithm for flattening overlapping ranges

    - by Joseph
    I am looking for a nice way of flattening (splitting) a list of potentially-overlapping numeric ranges. The problem is very similar to that of this question: Fastest way to split overlapping date ranges, and many others. However, the ranges are not only integers, and I am looking for a decent algorithm that can be easily implemented in Javascript or Python, etc. Example Data: Example Solution: Apologies if this is a duplicate, but I am yet to find a solution.

    Read the article

  • Can I use Ubuntu One Icons for 3rd party thingy?

    - by Joseph Mills
    So I am wondering what the guide lines are for using Ubuntu One icons as I have heard from a number of people that Ubuntu One has some propitiatory things to it. So I am not sure if I am to use there logo in something like this http://bazaar.launchpad.net/~josephjamesmills/ubuntutv/fan_art/download/josephjamesmills%40gmail.com-20120728145710-sy00cvq1ja8o9qad/ubuntuoneactive.png-20120728145613-jtjdupswpqiocpb2-266/ubuntuone-active.png If That is OK ? I know that this might be a silly question but I do not want to get myself in trouble.Thanks so much for reading this and helping me with a project that helps others ;)

    Read the article

  • SIMPLEST way to set up password protection for a static site, with basic admin UI?

    - by Joseph Turian
    I have a static site. I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about performance. I don't care if it's PHP or Django or whatever, I just want a complete software package. Apache basic auth isn't good, because you can't log out. Nor is there a UI for adding users. I tried throwing everything behind Django auth and serving the files through Django. However, Chrome treats all my text/css headers as text/plain, so I don't get any stylesheets showing. I can't use mod_xsendfile on my server because I can't reconfigure Apache to add new modules. I think this approach is overkill anyway. I can try configuring Nginx's X-Accel-Redirect, however that requires implementing all the Django code for auth myself, and I'd prefer an existing solution. However, this is my backup plan. Is there a code package that implements authentication with basic admin for a static site?

    Read the article

  • How do I get a different type of scrollbars in 12.04? [closed]

    - by Joseph Garvin
    Possible Duplicate: How do I disable overlay scrollbars? By default 12.04 uses overlay scroll bars that do not suit my taste, and every method I've found so far of disabling them makes them broken in a different way. When I was using 11.10 this wasn't a problem because I could still change the GTK theme. In 12.04, the Appearance settings only contain a few stock themes, and other than the special purpose contrast ones they all have the overlay scroll bars. If I aptitude search gtk3 | grep theme I get no results so there appears to be no packaged alternative either. Most suggestions I've seen for disabling the overlay scroll bars involve uninstalling packages or editing files as root. I want to disable them just for the current user, not for everyone on the whole box; as should be the case for any theme/display setting. There is a gsettings command that temporarily disables the overlay scrollbars just for the current user, but this has two problems of its own: The setting doesn't stick after log off. Because who would want to save settings? The scroll bars put in place have no contrast. They have a black scroller on a black background and are completely unusable. In short what I'd like to know is how to disable overlay scroll bars such that: My preference is user specific. My preference is actually saved. The scroller can actually be seen against the background without having to use a special high contrast theme that makes my whole desktop look like a negative photo from Tron.

    Read the article

  • How can I make refactoring a priority for my team?

    - by Joseph Garland
    The codebase I work with daily has no automated tests, inconsistent naming and tons of comments like "Why is this here?", "Not sure if this is needed" or "This method isn't named right" and the code is littered with "Changelogs" despite the fact we use source control. Suffice it to say, our codebase could use refactoring. We always have tasks to fix bugs or add new features, so no time is put aside to refactor code to be better and more modular, and it doesn't seem to be a high priority. How can I demonstrate the value of refactoring such that it gets added to our task lists? Is it worth it to just refactor as I go, asking for forgiveness rather than permission?

    Read the article

  • Ubuntu 12.10 dual boot windows 7 not working

    - by Joseph
    When i install ubuntu, and the computer restarts it doesn't show the boot managaer so it always boots in windows 7. I tried to change the default os, and ubuntu wasn't even listed in it. Then I read a how to on it, it showed how to size the partions and make them correctly, but it still didn't work. I tried easyBCD and still no success. I've tried installing it about 4-5 times and i still can't get it. What can i do to fix it?

    Read the article

  • Going from a math career to a cs career: how to do it?

    - by Joseph
    Hey, I'm looking for some advice on how to successfully make the transition from mathematics to CS. My academic background is in mathematics (BS and MSc), and I've taken loads of math courses as well. You name it, and I took it: Measure Theory, Algebra, PDES, Manifolds, Complex Analysis, etc. I progressed quite far along this track, and at one point, I thought I would be a professional mathematician...But around the time I was finishing my MSc, I really got sick of it. Studying very abstract mathematics was fun, but it really lost it's appeal to me. Outside of a couple hundred people, I'm not sure if anybody would understand my research. I did not want to be 60 years old and say that my only contribution to the world consisted of published papers. Anyways, I've been an off and on hobbyist programmer since 2002. I've programmed in C and Java (just small projects), and I really started to be drawn to the area as time passed. There's a real appeal to CS work because, well, it actually means something to other people out there! I enjoy all parts of it: designing webpages (a real artistic appeal). On the other end, I do enjoy toying with compilers and more nitty-gritty stuff as well. Suffice to say, I have broad interests out there. Anyways, I know it's a bit late, but I was wondering if there were other folks out there who made the change, and if so, how I could do so. I know I have some fairly big gaps to fill in terms of data structures, lack of internship experience, etc. But I really would like to make this work. So my question is simply: How can I make the switch from math to CS? To pay the bills, I'll be doing financial analysis for a company, but I'd like to eventually transition into a developer type position. I've been reading "Algorithm Design" by Tardos and doing all the problems. It's not hard to make progress since the problems are far more concrete than the stuff I've been doing the past six years. I feel I can make fairly rapid progress in picking up all the materials from data structures, etc. but none of it can substitute the past several years I've lost. Anyways, I'm eager to learn but would love some advice/concrete direction. Thanks, Joseph

    Read the article

  • Core Data managed object context thread synchronisation

    - by Ben Reeves
    I'm have an issue where i'm updating a many-to-many relationship in a background thread, which works fine in that threa, but when I send the object back to the main thread the changes do not show. If I close the app and reopen the data is saved fine and the changes show on the main thread. Also using [context lock] instead of a different managed object context works fine. I have tried NSManagedObjectContext: - (BOOL)save:(NSError **)error; - (void)refreshObject:(NSManagedObject *)object mergeChanges:(BOOL)flag; at different stages throughout the process but it doesn't seem to help. My core data code uses the following getter to ensure any operations are thread safe: - (NSManagedObjectContext *) managedObjectContext { NSThread * thisThread = [NSThread currentThread]; if (thisThread == [NSThread mainThread]) { //Main thread just return default context return managedObjectContext; } else { //Thread safe trickery NSManagedObjectContext * threadManagedObjectContext = [[thisThread threadDictionary] objectForKey:CONTEXT_KEY]; if (threadManagedObjectContext == nil) { threadManagedObjectContext = [[[NSManagedObjectContext alloc] init] autorelease]; [threadManagedObjectContext setPersistentStoreCoordinator: [self persistentStoreCoordinator]]; [[thisThread threadDictionary] setObject:threadManagedObjectContext forKey:CONTEXT_KEY]; } return threadManagedObjectContext; } } and when I pass object between threads i'm using -(NSManagedObject*)makeSafe:(NSManagedObject*)object { if ([object managedObjectContext] != [self managedObjectContext]) { NSError * error = nil; object = [[self managedObjectContext] existingObjectWithID:[object objectID] error:&error]; if (error) { NSLog(@"Error makeSafe: %@", error); } } return object; } Any help appreciated

    Read the article

  • IPhone App Signing: A valid signing identity matching this profile could not be found in your keycha

    - by Ben Reeves
    I'm pulling my hair out over this. I just downloaded the iphone 3.0 SDK, but now I can't get my provisioning profiles to work. Here is what I have tried: Delete all provisioning profiles Delete login keychain Create new "login" keychain, make it default Create a new cert signing request Create new developer and distribution certs in the apple developer center Download and install them Download the WWDR cert and install it Create a new provisioning profile and double click it to install All the certificates report as valid, but xcode still won't recognize them. Anyone got any ideas? Thanks Edit: I completely re-installed osx and from a fresh install installed the 3.0 sdk and still the same problem.

    Read the article

  • Core Data: NSFetchRequest sorting by count of to-many relationship

    - by Ben Reeves
    Say I have an parent entity, each of which have a number of children. I want to get all the parents sorted by their number of children. Something similar to the following pseudo code: NSEntityDescription * entity = [NSEntityDescription entityForName:@"Parent" inManagedObjectContext:managedObjectContext]; [[NSSortDescriptor alloc] initWithKey:@"children.count" ascending:NO]; //Execute request Is there a way construct a fetch like this using core data? Thanks, Ben

    Read the article

  • Referencing Entity from external data model - Core Data

    - by Ben Reeves
    I have a external library which includes a core data model, I would like to add a new entity to this model which has a relationship with one of the entities from the library. I know I could modify the original, but is there a way to without needing to pollute the library? I tried just creating a new model with an entity named the same, but that doesn't work: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't merge models with two different entities named 'Host''

    Read the article

  • Authenticating stackoveflow programatically - OpenID

    - by Ben Reeves
    I would like to add up and down voting to my iPhone appilcation - MyStacks, for this I need the to be able to authenticate the user with SO. I'm look at adapting the Twitter-OAuth-iPhone library. However The problem I have is obtaining the consumer and secret key. to use OAuth, do I need to obtain a different key for each provider? In order to obtain a consumer key from google the application needs to have a domain name, but this being an iPhone app of course i don't have one, does this mean that I can't use OAuth? Is there any other way to programatically authenticate SO? Thanks, Ben

    Read the article

  • Drawing only part of a texture OpenGL ES iPhone

    - by Ben Reeves
    ..Continued on from my previous question I have a 320*480 RGB565 framebuffer which I wish to draw using OpenGL ES 1.0 on the iPhone. - (void)setupView { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, (int[4]){0, 0, 480, 320}); glEnable(GL_TEXTURE_2D); } // Updates the OpenGL view when the timer fires - (void)drawView { // Make sure that you are drawing to the current context [EAGLContext setCurrentContext:context]; //Get the 320*480 buffer const int8_t * frameBuf = [source getNextBuffer]; //Create enough storage for a 512x512 power of 2 texture int8_t lBuf[2*512*512]; memcpy (lBuf, frameBuf, 320*480*2); //Upload the texture glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, lBuf); //Draw it glDrawTexiOES(0, 0, 1, 480, 320); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; } If I produce the original texture in 512*512 the output is cropped incorrectly but other than that looks fine. However using the require output size of 320*480 everything is distorted and messed up. I'm pretty sure it's the way I'm copying the framebuffer into the new 512*512 buffer. I have tried this routine int8_t lBuf[512][512][2]; const char * frameDataP = frameData; for (int ii = 0; ii < 480; ++ii) { memcpy(lBuf[ii], frameDataP, 320); frameDataP += 320; } Which is better, but the width appears to be stretched and the height is messed up. Any help appreciated.

    Read the article

  • Drawing only part of a

    - by Ben Reeves
    ..Continued on from my previous question I have a 320*480 RGB565 framebuffer which I wish to draw using OpenGL ES 1.0 on the iPhone. - (void)setupView { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, (int[4]){0, 0, 480, 320}); glEnable(GL_TEXTURE_2D); } // Updates the OpenGL view when the timer fires - (void)drawView { // Make sure that you are drawing to the current context [EAGLContext setCurrentContext:context]; //Get the 320*480 buffer const int8_t * frameBuf = [source getNextBuffer]; //Create enough storage for a 512x512 power of 2 texture int8_t lBuf[2*512*512]; memcpy (lBuf, frameBuf, 320*480*2); //Upload the texture glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, lBuf); //Draw it glDrawTexiOES(0, 0, 1, 480, 320); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; } If I produce the original texture in 512*512 the output is cropped incorrectly but other than that looks fine. However using the require output size of 320*480 everything is distorted and messed up. I'm pretty sure it's the way I'm copying the framebuffer into the new 512*512 buffer. I have tried this routine int8_t lBuf[512][512][2]; const char * frameDataP = frameData; for (int ii = 0; ii < 480; ++ii) { memcpy(lBuf[ii], frameDataP, 320); frameDataP += 320; } Which is better, but the width appears to be stretched and the height is messed up. Any help appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >