Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading vertex arrays in the graphics card ?




On Dec 26, 2004, at 10:32 PM, Christopher Niederauer wrote:

I am wondering how I could load an array (or even more than 1) of vertices (and related colors, normals, tangents, texcoords) into the memory of the graphics card, once and for all.

ARB_vertex_buffer_object (10.3+, cross-platform)
http://oss.sgi.com/projects/ogl-sample/registry/ARB/ vertex_buffer_object.txt


APPLE_vertex_array_range (10.2+, mac-specific)
http://oss.sgi.com/projects/ogl-sample/registry/APPLE/ vertex_array_range.txt


The mac-specific extension is really not an option sinc the code must work on Linux, so I looked into ARB_vertex_buffer_object, and this is really weird, but apple's developer website doesn't talk about it (http://developer.apple.com/graphicsimaging/opengl/extensions.html), and glxinfo on X11 doesn't give me that extension (any way to get the opengl extensions without using glxinfo on X11 ?). When I read from the spec you gave me, it says that this extension is used in OpenGL 1.4, but OS X.3 uses OpenGL 1.2.1... So where is this extension hidden ?

ARB_vertex_buffer_object (aka VBO) was added in 10.3.4 and should be supported on any card that already supports APPLE_vertex_array_range (aka VAR). If you are running on a capable system, double check the extensions list for it (not all ARB extensions are next to each other) – but please do file a bug if its really not there.


Let me ring in here, too, that APPLE_vertex_array_range is a better suited spec for certain circumstances, such as modifying a small sub range of data for streaming. It has the ability to flush a sub range of data when modified, whereas VBO requires at the very least a call to BufferSubData (which means at least one more copy for non-cached data) or flushing the entire range if you modify a piece of the data manually via mapping (whew, did that make sense? ;-). The main benefit that VBO provides over VAR is the ability to mix and match multiple buffer objects (ie streamable vertex positions with static texture coords). Since you are asking about statically caching data on the video card, I think VBO should work out fine, but don't let #ifdef's stop you from using a better suited API whenever applicable (not just VAR vs VBO)!

Chris


Thanks for the advice Chris. I now updated to OS X.3.7, and I found the extension in the list of supported extension. Thanks to the documentation I was able to rewrite my code pretty fast to take advantage of it, but now one problem arises : in what header is this extension defined ?
I took a look in /System/Frameworks/Opengl.framework/header/glext.h but it's just not there, although the oss.sgi.com website says it should be right in there :|


Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >Re: Loading vertex arrays in the graphics card ? (From: Christopher Niederauer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.