Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › OpenGL - Object Loader
New Posts  All Forums:Forum Nav:

OpenGL - Object Loader

post #1 of 7
Thread Starter 
Does anyone know any good object loader for windows? I'm currently programming a kind of game, for a university project, that you have a character and 4 houses and I need to load those .obj files... And, of course, I'm trying to avoid writing an object loader myself...

Thanks
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
post #2 of 7
Thread Starter 
Well in the meantime I'm trying to write my own .obj loader but I can't find any good tutorials with working code... I just want to load a simple object, probably just some cubes and stuff, how hard can it be?
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
post #3 of 7
Nope. There are a few out there, but they are all buggy will only work with certain .obj files.

Your best bet is to just roll your own. If you just want something simple you can just ignore all of the complex stuff, which should be easier than trying to understand someone else's code.

http://en.wikipedia.org/wiki/Wavefront_.obj_file

You basically just have to parse file. Read in all of the vertex info into some kind of list and build the scene from the face definitions.
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #4 of 7
Thread Starter 
Ok, thanks, I'll try that. I just didn't want to have the trouble because it seems boring and complex to do and I'm short on time... +rep for the help
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
post #5 of 7
Tutorials 25 and 31. Also look at article 18. This should shave some time off of creating your own.
http://nehe.gamedev.net/
Ever Changing
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 GO 400x9 1.392v p5q pro turbo MSI Twin Frozr III 1G/OC 6950 Kingston HX (4x1gb 800mhz) 
Hard DriveOptical DriveOSMonitor
WD 80gb 16mb cache DVd rw win 7 24" ctl 
PowerCase
Rx 630SS CM 690 II Advanced 
  hide details  
Reply
Ever Changing
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 GO 400x9 1.392v p5q pro turbo MSI Twin Frozr III 1G/OC 6950 Kingston HX (4x1gb 800mhz) 
Hard DriveOptical DriveOSMonitor
WD 80gb 16mb cache DVd rw win 7 24" ctl 
PowerCase
Rx 630SS CM 690 II Advanced 
  hide details  
Reply
post #6 of 7
Thread Starter 
Now I'm using GLM (my professor recommended) and now I have this errors:

The thread 'Win32 Thread' (0x38c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x8a4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf34) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb98) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xd8c) has exited with code 1 (0x1).
The program '[3092] Trabalho.exe: Native' has exited with code 1 (0x1).

It's supposed to draw a terrain (simple stuff), some teapots and load and draw a model... But the window just open and close instantly, giving that error. please help :S
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
post #7 of 7
Thread Starter 
I found the source of the problem

model = glmReadOBJ("house.obj");

Maybe the problem is the model?
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
Rubbish
(15 items)
 
  
CPUMotherboardGraphicsRAM
E7400 @ 4ghz 1.376v Asus P5Q3 Sapphire HD6870 Kingston 4GB DDR3 1333MHZ 
Hard DriveHard DriveOSOS
Samsung Spinpoint F3 WD Green Windows 7 64bit Lubuntu 64bit 
PowerCaseMouse
OCZ ModXStream 700W Cooler Master 690 II with side window Razer Deathadder Black Edition 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › OpenGL - Object Loader