Thread: Dynamic load a 3d model from a file located in a webserver

  1. #1
    Registered User
    Join Date
    Feb 2013

    Dynamic load a 3d model from a file located in a webserver


    I have done a test, I have edited with the WordPad in Windows on my Local Webserver a file banana.h which contains a list of float arrays in order to extract one array and create a text file named ObjVerts.txt
    I have done a lot of search in the Web in order to find a small piece of code that can read the text file and convert it to a float array GLfloat, but I did not find any.
    I have found a lot of piece of code that read the file and make a NSData but many of the code seem to not work.
    It seem that the last statement return nothing!
    Please I would appreciate if you can guide me a bit more.
    Here the piece of code I did try :

    NSURL *myurl = [NSURL URLWithString:@"http://localhost/ObjVerts.txt"];
    //NSString *mystring = [NSString stringWithContentsOfURL:myurl];
    NSData *mydata = [NSData dataWithContentsOfURL:myurl];
    thanks Regis

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Are you writing Objective-C code?
    It's not something we see a lot of round here. You might be better off finding another forum with a more obvious support for your chosen programming language.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 3d Model file format
    By glo in forum Game Programming
    Replies: 4
    Last Post: 09-15-2008, 04:33 PM
  2. Webserver - Detect Type of File
    By Siphon in forum C Programming
    Replies: 4
    Last Post: 09-26-2007, 02:52 AM
  3. Returning from function located in object file
    By lord_didger in forum C Programming
    Replies: 3
    Last Post: 01-24-2006, 06:18 AM
  4. model load problem
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 01-05-2006, 06:33 PM
  5. Replies: 4
    Last Post: 12-19-2005, 03:01 PM