Results 1 to 2 of 2

Thread: Displaying dae files in openGL

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2008
    Posts
    27

    Displaying dae files in openGL

    I have been playing around setting up my 3d game in openGL. I am at the point where I want to display 3d models. I was recommended to render .dae files. Am not sure, how to go about this..

    I have been reading for sometime (mainly the specification) about dae files and I understand they are xml files. I also understand some of the concepts about data sink and data source, how data is organized in meshes, etc. But, am not sure how to proceed.

    From what I understand, I need to parse the xml and store vertices/triangles in my own structures and feed openGL the same to render the model. Am I correct?

    Can someone please point me in the right direction..

    Also, is there a library available which parses the xml for me and returns all the triangles / geometry? If so, I can then work on translating them data structures to something that openGL would understand.

    I would appreciate any help.
    Thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    CA
    Posts
    408

    Re: Displaying dae files in openGL / Irrlicht

    I don't know how to deal with .dae files directly but I have read that there is an openGL scene crossplatform Linux/win/etc library called Irrlicht that has all kinds of 3d file formats that it loads -- see Article on Irrlicht which states it can load .dae files.

    To see it power check out the example scenes

    One note on the example article above, it seems to be a little out of date with the latest Irrlichht version. You will need to replace one line
    Code :
    	device=createDevice(video::EDT_OPENGL,
    		dimension2d<s32>(640,480),16,false,true);
    with
    Code :
    	device=createDevice(video::EDT_OPENGL,
    		dimension2d<u32>(640,480),16,false,true);

    ie s32 -> u32

    Also you can delete the line
    Code :
    #include "unistd.h"
    since it is not being used at all here

Similar Threads

  1. Displaying dae files in openGL
    By brainydexter in forum COLLADA
    Replies: 22
    Last Post: 11-06-2009, 06:12 AM
  2. Replies: 1
    Last Post: 02-21-2007, 11:40 PM
  3. reading and displaying .PPM files
    By ammir in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-02-2001, 10:46 AM
  4. displaying bitmaps in 2d(or raw files)
    By Starnut coder in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-28-2001, 01:36 AM
  5. displaying .bmp files
    By jgrashow in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 06-02-2000, 11:58 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