User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 361,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,020 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 210 | Replies: 2 | Solved
Reply
Join Date: May 2008
Posts: 51
Reputation: Clockowl is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
Clockowl Clockowl is offline Offline
Junior Poster in Training

Unstable Program

  #1  
May 10th, 2008
Hai guys,

I have quite a large program here that I don't seem to understand. The program, Bow Vice Jet (an anagram for object view) is meant to display WaveFront .obj files. However, it quits when it loads a specific file while on my computer, while on another it does not. I can't find the bug, and it's very annoying. Maybe it has got something to do with memory allocation, maybe something else. If anyone sees any mistake in the code, please point it out and I will correct it. I know it's a vague question, "Find the bug", but I've been searching for quite some time now and can't figure it out.

The code is attached, together with the "quiting" file and a file that almost works. To see how these files should look in 3D space, download GLC Player or use your favorite 3D mesh viewing program.

Thanks in advance,
Nick
Attached Files
File Type: zip Bow Vice Jet.zip (237.5 KB, 2 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 51
Reputation: Clockowl is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
Clockowl Clockowl is offline Offline
Junior Poster in Training

Re: Unstable Program

  #2  
May 10th, 2008
Solved:

  1. glDrawElements(GL_QUADS, quadcount, GL_UNSIGNED_INT, quadindex);
  2. glDrawElements(GL_TRIANGLES, trianglecount, GL_UNSIGNED_INT, triangleindex);
-->
  1. glDrawElements(GL_QUADS, quadcount*4, GL_UNSIGNED_INT, quadindex);
  2. glDrawElements(GL_TRIANGLES, trianglecount*3, GL_UNSIGNED_INT, triangleindex);

I'll read function descriptions more carefully next time, fo'sho.
Last edited by Clockowl : May 10th, 2008 at 5:07 pm.
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 665
Reputation: jephthah has a spectacular aura about jephthah has a spectacular aura about jephthah has a spectacular aura about 
Rep Power: 4
Solved Threads: 42
jephthah's Avatar
jephthah jephthah is offline Offline
Practically a Master Poster

Re: Unstable Program

  #3  
May 10th, 2008
lol. i love these threads, only because it tends to be my own M.O.:

post a question for help, then while waiting for responses to trickle in, go about trying to solve it myself anyhow. sometimes just formulating the question reveals the answer.

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 3:16 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC