render to vertex array?

Started by
4 comments, last by Niz0r 19 years, 4 months ago
Hi, i have some problems finding out what my options are on this. I have a Geforce 6800 ultra and if the solution only works on that, then it's fine, it just needs to be fast :) What i want is this: 1. I render vertex data to a pbuffer (using rendertexture). 2. I want this data sent to opengl as vertex data. I can't find my way around the possibilities i find on the net... I have a solution running, but it doesn't strike me as optimal. I simply use glReadPixels() to read from the texture into an array, which i then iterate through. Is there some way i can keep my data on the gpu? I heard something about vertex texture fetches could do something, but i have no clue as to what.
Advertisement
This extension should be what you're looking for. But it only seems to be supported on NVIDIA hardware. glView says it uses GL_NV_pixel_data_range, so I'm not sure why its an EXT extension, but what the heck, maybe you can use it.

--Buzzy
I've never done this, as I use D3D, but if you want more search terms, they ofter refer to this as an "uber buffer". Looks like a decent number of google hits. Good luck.
Thx for posting, but i've settled on using vertex texture fetches. All the other methods involved using glReadPixels().
The method Buzzy suggested, using pixel_buffer_object does involve "using readpixels" but you're reading data from one buffer object to another, in other words copying vid mem to vid mem, which should be fast. So this is nothing to worry about. So it isn't strictly speaking "render to vertex array" but "copy to vertex array", but it still does what you want and might be better performance than using vertex textures.
Hmm, i'll look into it when everything else is working :)

This topic is closed to new replies.

Advertisement