Skip to main content
GameDev.net gamedev.net
🔒 Locked

Question on glMapBufferARB

Started by fms Oct 26, 2005 at 7:20 AM 1 replies 1k views
Original Post
fms
fms
Hi, I read the specification on glMapBufferARB(). However, I am really confused now and could not clearly understand if it maps the memory from the GPU side to CPU side or is it the other way around. If glMapBufferARB() maps data from memory from GPU to CPU, then glBufferDataARB() transfers data from the CPU to the GPU. Please comment on this as well. Thanks. - FMS
_the_phantom_
_the_phantom_
glBufferDataARB() transfers memory from your programs memory to the drivers control, as such it can be moved into GPU ram.

glMapBufferARB() on the other hand maps to system ram and allows you to copy data directly into it, at which point once it is unmapped the drive can send it back to vram.

They both serve different useage patterns, writing directly to the pointer returned by glMapBufferARB() can remove a memory copy when you are generating the data on the fly, however glBufferDataARB() can provide better speed if you already have the data in ram and just need to copy it somewhere else.
fms
fms
Hi,

Does using pixel buffer objects provide any speedup when downloading the texture images (CPU->GPU)? I know for sure that they provide substantial gain and can be pipelined when uploading images (GPU->CPU). Please comment if you have any valid information regarding PBO usage when downloading texture images.

Thanks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.