Results 1 to 3 of 3

Thread: OOP and openGL

  1. #1
    Guest

    OOP and openGL

    I'm beginner, and i thinking in my owner class of opengl. I want to know or take some idea , how define opengl class, which class are usually used. And another think is about performance and frame rate, of course, this depends of compiler, but generally the use of OOP (C++) can afect then frame rate?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: OOP and openGL

    For the design part, I am pretty bad at it and I am reading some books about that right now to make me better, so I won't talk about that.

    For performance, there is nothing to be scared about, C++ can run the same speed(and most often faster) than C, because of inlining and other things that I don't really understand. Good C programs really are C++ programs without Class(using struct instead) and without inlining.

    Inlining can get you a couple of more fps.

    So there is no major difference in speed.

  3. #3
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: OOP and openGL

    There can actually be a performance difference, but usually it's not too much. (OOP can be like 30% slower sometime ... but not too frequent in graphic apps)
    I surely recommend using OOP since it usually reduces bugs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean