Thread: Speeding Up Obj Loader for OpenGL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    So split it all up into triangles at load-time. IIRC OpenGL deals with triangles when it gets down and dirty anyway so you will probably get a speed-increase just by splitting it all up into triangles once and not let opengl do it at run-time.

  2. #2
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    I tryed to compile the VBO tutorial Posted above and got these errors

    Does this mean my version of OpenGL does not support this? or am I missing something?

    Im using DevC++ with the OpenGL Headers that come with it.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Matty_Alan View Post
    I tryed to compile the VBO tutorial Posted above and got these errors

    Does this mean my version of OpenGL does not support this? or am I missing something?

    Im using DevC++ with the OpenGL Headers that come with it.
    Those are definitely things to do with this, I believe:
    Code:
    #define GL_GLEXT_PROTOTYPES 1		/* include prototypes to save us some compiler warnings, etc */
    Which this could be platform and even driver specific. Thanks for letting me know, mebbe I will do some digging and do that update.

    The reason for those switches is because the VBO functions used to have _ARB suffixes, which means they were for testing by the "Architecture Review Board" and associated parties. But they have depreciated stuff at the same time as they have failed to provide support for what comes after what is now "legacy", methinks.

    Probably if you ask at the OGL forum and refer directly to that tutorial code someone will have an answer. In any case, post your OS and GL driver (nvidia or ATI). I'm guessing it's most likely a windows issue with the headers/define switches.

    My tutorial aside, VBOs are the way to go (google: there are other tutorials for different platforms around, windows to iphone -- openEL uses VBOs, there is no immediate mode -- but they are somewhat piecemeal. Start reading and combine them ). Once you have that, you can start using shaders/glsl (these are short precompiled programs you can keep in video memory, along with the vertex data, to complete all of the rendering within the GPU -- you issue parameters to shaders like functions or objects. Contemporary high performance 3D stuff, with both DX and OGL, is all shaders).

    Vis, learning curve, 3D graphics reminds me of web-dev in the sense that you are often dealing with different "technologies" on different levels that have different dimensions of cross-platform compatibility, but the end result is supposed to take place in someone's desktop environment. Many discrete pieces to fit together that are generally presented abstracted enough from one another to cover all cases in a relationship, but in real terms require intuitive leaps.
    Last edited by MK27; 04-23-2010 at 05:02 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    I done some googling and found out that i needed Glee to fill some gaps

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to use 'this' for different obj in class
    By effa in forum C++ Programming
    Replies: 2
    Last Post: 10-06-2009, 08:01 PM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. OBJ TDS files .. what are they ?
    By moonwalker in forum C++ Programming
    Replies: 1
    Last Post: 07-22-2002, 02:21 PM
  4. ARG.... My Texture Loader is screwed... PLEASE HELP!
    By minime6696 in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-22-2002, 05:45 PM