Results 1 to 2 of 2

Thread: 3ds float assignment according a file

  1. #1
    Senior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    171

    3ds float assignment according a file

    hi

    i am working with lib3ds
    and here is a part of file

    Code :
     float Trivert[64][3];
    Lib3dsMesh *testmesh;
    void Load3Ds(const char *Filename, float Trivert[64][3])
    {
    //Function is just started
     
    Lib3dsFile *testfile;
    Lib3dsIo *testio;
     
    printf("Testing of 3ds file in OpenGL\n");
    printf("how to load 3ds file for reading data\n");
     
    testfile = lib3ds_file_open(Filename);
     
    fprintf(stdout,"before assginig array\n");
     
    for(int i=0;i<=(testfile->meshes_size)/12;i++)
    lib3ds_quat_copy(Trivert[i],testfile->meshes[0]->vertices[i]);
     
    fprintf(stdout,"array assigned successful\n");
    //Success
    }

    Here My Problem is
    As i make Trivert[64][3]
    a big block in memory
    i want to make
    a pointer *Trivert[3]
    i am not Guru in programming
    so is *Trivert[3] means Trivert[3]as_long_we_assign]
    or
    Trivert[as_long_we_assign][3]
    and i want to do that because if the file contains more than 65 points then this Trivert[64][3]
    may be give up and if less then 65 points then the remain are going to be waste

    i ry to make that *Trivert[3] with change in thus assigning Trivert suitably

    programme get compiled but on running it give me a segmentation error without that it just works and objects get created

    Please help me
    i am just a beginner in OpenGL
    thanks in advance
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    171

    Re: 3ds float assignment according a file

    code is a bug i tested many files
    (huh need some resources)
    please some one can help
    reply
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

Similar Threads

  1. Need some help with my final assignment
    By LordEmp in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-08-2016, 06:35 PM
  2. Assignment of work_items to work_groups
    By llaves in forum OpenCL
    Replies: 4
    Last Post: 05-31-2010, 12:49 PM
  3. Need an Assignment done if possible.
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-07-2005, 08:35 PM
  4. OpenGL ASSIGNMENT
    By Mysterious in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 11-04-2003, 04:48 PM
  5. OpenGL Assignment
    By Mysterious in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-04-2003, 05:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean