Vertex Buffer Objects sketch/proposal

"Mike C. Fletcher" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Been turning over this problem in my mind, thought I'd post it here for 
feedback:

    * The Vertex Buffer Objects extension is hacky in many ways:
          o It treats pointer arguments as pointer-offsets (type-unsafe)
          o It rewrites the APIs of large numbers of functions
            throughout the system

But it's an ARB extension and needs to be supported... So here's what 
I'm planning:

    * class GLPointerOffset( integer )
          o Instances that can be passed into array-accepting
            parameters, (internally will just cast to the correct type
            for the call before passing it in)
          o Track the pointer offset's VBO's structure so that it can
            handle queries for size, data-type and the like for wrapped
            operations (yes, that's messy, but otherwise you have to do
            raw-API queries for everything)
    * Make sure that *all* functions have an available raw API as well
      for those corner cases where people are e.g. storing mixed
      data-types in a string or something similar (I want to do this
      anyway, VBO is just an excuse)
          o Currently these are available as function.wrappedOperation
            for wrapper.Wrapper based functions, but custom functions
            should have wrappedOperation attributes set so that the API
            is consistent throughout the packages
          o You will still have to use the pointer-offset to pass in the
            offset into the VBO even in the raw APIs

Anyway, don't know when I'll get time to work on it, but that's the 
direction I'm considering.

In other news, the Demo/GLUT/molehill.py demo (gluNurbsSurface) works on 
Win32, while it fails on Linux(64), just another clue, not a solution yet.

Have fun all,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.