New Apple Render to Vertex Buffer Sample
For generating those *really* high-poly meshes efficiently 
http://developer.apple.com/samplecode/PB...index.html

http://developer.apple.com/samplecode/PB...index.html
How in the name of all that is beautiful (like this demo) did they manage to get that plane of vertices to modulate so smoothly on my iBooks little 9550.

Jones Wrote:How in the name of all that is beautiful (like this demo) did they manage to get that plane of vertices to modulate so smoothly on my iBooks little 9550.
Same here. Except it worked smoothly on my 5200!
I am annoyed
Code:
NVIDIA GeForce2 MX OpenGL Engine 1.1 NVIDIA-1.4.18
----------------------------------
GL_EXT_framebuffer_object 0
GL_ARB_pixel_buffer_object 1
GL_ARB_vertex_buffer_object 1
GL_ARB_shader_objects 1
GL_ARB_shading_language_100 1
GL_ARB_vertex_shader 1
GL_ARB_fragment_shader 0
GL_ARB_texture_rectangle 1
GL_APPLE_float_pixels 0
----------------------------------
Required functionality not available on this renderer.
Sir, e^iπ + 1 = 0, hence God exists; reply!
Aww rats! Don't feel bad unknown, you aren't the only one left out in the cold:
Code:
Intel GMA 950 OpenGL Engine 1.2 APPLE-1.4.32
----------------------------------
GL_EXT_framebuffer_object 1
GL_ARB_pixel_buffer_object 1
GL_ARB_vertex_buffer_object 1
GL_ARB_shader_objects 1
GL_ARB_shading_language_100 1
GL_ARB_vertex_shader 1
GL_ARB_fragment_shader 1
GL_ARB_texture_rectangle 1
GL_APPLE_float_pixels 0
----------------------------------
Required functionality not available on this renderer.
The posted sample has a bug, it should run without APPLE_float_pixels.
Make this change:
An updated sample will be posted soon.
Make this change:
Code:
// extension index
enum {
EXT_framebuffer_object,
ARB_pixel_buffer_object,
ARB_vertex_buffer_object,
ARB_shader_objects,
ARB_shading_language_100,
ARB_vertex_shader, /* ADD THIS */
ARB_fragment_shader,
ARB_texture_rectangle,
APPLE_float_pixels,
};
An updated sample will be posted soon.
Yeah, that fixed it. Runs pretty smooth for all those polys, even on the GMA 950.
I'll admit I'm not up to speed on this extension. What can it be used for in real life games? What is the advantage over older methods?
If I understand it correctly the texture acts as a height map, sort of, but it contains the actual vertex data. Right?
I'm simply curious about the possibilities with this method.
KenD
If I understand it correctly the texture acts as a height map, sort of, but it contains the actual vertex data. Right?
I'm simply curious about the possibilities with this method.
KenD
CodeBlender Software - http://www.codeblender.com
This technique is good for generating geometry entirely on the GPU. The sample is showing the vertex array connected as tristrips (essentially a heightfield) but there is no constraint on the geometry you generate.
In particular, people have found this method useful for animating particle systems. See Building a Million Particle System and Nvidia's related example.
This also allows a hybrid of 2D image processing and 3D geometry, since any image filter you apply to the texture will affect the vertex array. For example, you can take live video feed and treat the luminance as height.
In particular, people have found this method useful for animating particle systems. See Building a Million Particle System and Nvidia's related example.
This also allows a hybrid of 2D image processing and 3D geometry, since any image filter you apply to the texture will affect the vertex array. For example, you can take live video feed and treat the luminance as height.
Interesting. I need to take a closer look at the particle stuff.
KenD
KenD
CodeBlender Software - http://www.codeblender.com
arekkusu Wrote:An updated sample will be posted soon.
Update is posted. Should work out-of-the-box now on everything that supports FBO.
Whoa, this looks really useful. I'll have to look at the code for it.
Newest game: Glow, a sci-fi RPG with lots of zombie bashing. Get it: OS X
Can I ask for a simple explanation of what is going on in this demo?
I can look at the GLSL and FBO setup stuff and other function calls etc. etc.... and given 30 minutes or so I can probably figure out why this is cool, and how I can use it.
However if anyone feels they already understand what is going on and could take the time to explain it, that would save me time and no doubt make this code more interesting and available to a wider audience.
I'm thankful for the post, and the code. It is useful to some, but a little explanation would make it more useful to more people.
I can look at the GLSL and FBO setup stuff and other function calls etc. etc.... and given 30 minutes or so I can probably figure out why this is cool, and how I can use it.
However if anyone feels they already understand what is going on and could take the time to explain it, that would save me time and no doubt make this code more interesting and available to a wider audience.
I'm thankful for the post, and the code. It is useful to some, but a little explanation would make it more useful to more people.
Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
In essence, what you do is use the fragment processor to generate lots of vertices, given a few -- for example, you could use it to heavily tessellate a bezier patch. The issue then is, how to use those generated vertices. This sample addresses that issue, keeping the generated vertices in VRAM all the way.
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Render video (e.g. QuickTime) to buffer or texture? | Ingemar | 14 | 19,853 |
Jun 8, 2011 04:09 PM Last Post: mdejong1024 |
|
Sample Code Apple removed? | SaxMan | 12 | 10,701 |
Jan 17, 2009 05:26 PM Last Post: AnotherJake |
|
Vertex buffer generation and rendering iphone | eliscool | 2 | 4,227 |
Dec 17, 2008 05:57 PM Last Post: ThemsAllTook |
|
FBO sample code posted | arekkusu | 5 | 6,423 |
Sep 20, 2006 09:23 PM Last Post: Frank C. |
|
stack overflow creating a vertex buffer? | LongJumper | 6 | 7,391 |
Jul 5, 2005 10:39 PM Last Post: PowerMacX |