Reading in binary to display 3d shapes

Hi,

I’m new to this and would appreciate any help to get started using JOGL. I’m finding it a tad difficult at times!

I am wanting to read data from an external source and then use that data to plot it and draw 3d shapes. So the main problem is finding out how to read this data in from an exeternal file. The data will be in binary.

Any tips or solutions would be greatly appreciated, thanks!

What type of file does contains your 3D model; 3DS, AES…etc?

roger

Sorry, I should have been more specific the first time…

What I am trying to do is read in from a MIDI file, this is mostly binary numbers. Then take this data and use it to form a representation of the data.

Therefore I need two things…

First a basic demo on how to create 3d shapes and secondly if there is a generic code fragment that allows you to read from a file, such as this MIDI file.

Thanks in advance!

For file input, use FileInputStream which can load local files and files from url’s and give you a stream of bytes.

MIDI file format from wotsit.org: http://www.wotsit.org/download.asp?f=midi

For starting with 3d, try the redbook http://www.gamedev.net/download/redbook.pdf and OpenGL.org

Either that or be more specific :stuck_out_tongue: