Author Topic: 3D models in OpenGL in C  (Read 4056 times)

Fordcars123

  • Guest
3D models in OpenGL in C
« on: January 01, 2012, 03:09:39 PM »
Hi!

I'm new in this forum but not new with Pangea. I have bean programming with applescript and decided to step it up a notch and start programming in C. I have download the Pangea Software’s Ultimate Game Programming Guide for Mac OS X and I understand the basics so far. But now I am in chapter 13 and I need help. He says to go buy the 2000$ Maya but I don't have that much money (I'm only twelve). So I searched on the internet and found the app Blender. I sounds good but I don't know how to make openGL read an ".blend" file. Please post me a code or something to make OpenGL read ".blend" or ".obj". That would be very grateful.

Thanks,
Fordcars

szigetir

  • Guest
Re: 3D models in OpenGL in C
« Reply #1 on: January 01, 2012, 08:26:06 PM »
you're amazing.
Im 24 and all I can program is Hello World.  >:(
googled it yet?
you can get .pdf books on 3d modelling programming etc on eMule.

Fordcars123

  • Guest
Re: 3D models in OpenGL in C
« Reply #2 on: January 01, 2012, 08:35:40 PM »
Thanks! Yes I have googled it. But I put this aside for now because I have to worry about moving characters around. I can move the camera but not the characters. I have searched for quite some time but not alot of people write about mac open gl programming. It would be great if someone help me. Here is the code for moving characters that doesn't work:



if (gControlNeeds[kNeed_Forward_Button].value != 0)
   {
      raptorCoord.z -= gOneOverFramesPerSecond * 20.0f;   
   }
   
   else
      if (gControlNeeds[kNeed_Backward_Button].value != 0)
      {
         raptorCoord.z += gOneOverFramesPerSecond * 20.0f;   
      }
      
   if (gControlNeeds[kNeed_TurnLeft_Button].value != 0)
   {
      raptorCoord.x += gOneOverFramesPerSecond * 1.5f;   
   }
   else
      if (gControlNeeds[kNeed_TurnRight_Button].value != 0)
      {
         raptorCoord.x -= gOneOverFramesPerSecond * 1.5f;   
      }

   }

Fordcars123

  • Guest
Re: 3D models in OpenGL in C
« Reply #3 on: January 01, 2012, 08:47:11 PM »
Oh and Brian, well you know that I have your book and sample codes, well the sample code Chapter in 13 BG3D Linker Utility doesn't work. When I use with the correct makefile and hit open, it comes up with the alert "FSMakeFSSpec failed!" and I really need it. I looked in the script but I could not find the problem.

Thanks!

Shadowbreaker

  • Guest
Re: 3D models in OpenGL in C
« Reply #4 on: January 03, 2012, 11:16:01 PM »
You're amazing indeed :)

From my... limited experience I find that just googling stuff like this is a rather ineffective way of getting programming help. However, the open source and originally mac Aleph One game engine supports obj files (I'm not sure how well, though). Maybe you could check that out.

Fordcars123

  • Guest
Re: 3D models in OpenGL in C
« Reply #5 on: January 04, 2012, 07:07:54 AM »
Thanks! I tried it but it's powered with the languages lua and xml. I both never heard of them. But thanks anyway!

twilightsucksass

  • Guest
Re: 3D models in OpenGL in C
« Reply #6 on: January 15, 2012, 03:13:45 AM »


Hi!

I'm new in this forum but not new with Pangea. I have bean programming with applescript and decided to step it up a notch and start programming in C. I have download the Pangea Software’s Ultimate Game Programming Guide for Mac OS X and I understand the basics so far. But now I am in chapter 13 and I need help. He says to go buy the 2000$ Maya but I don't have that much money (I'm only twelve). So I searched on the internet and found the app Blender. I sounds good but I don't know how to make openGL read an ".blend" file. Please post me a code or something to make OpenGL read ".blend" or ".obj". That would be very grateful.

Thanks,
Fordcars
http://students.autodesk.com/ Enter your info and you can get Maya for free, legally, since you're a student. Your welcome :)
« Last Edit: January 15, 2012, 03:15:28 AM by twilightsucksass »