Sign in to follow this  

May I know what a patch (mesh) is?

This topic is 1851 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'd like to know what a patch is. In my Direct3D career, I usually deal with triangular meshes. Seldom touched patches, but I'd like to know what that is, just in case.

And what their advantages are?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites

I don't have much experience with this particular topic, and my experience is mainly in OpenGL rather than DirectX, so my answer might not be completely correct, but here is what I understand:

 

At least in OpenGL, a "patch" is basically like a triangle, but it has a user-defined number of vertices. Patches can only be used as the input for a tessellation shader, which breaks them down into triangles in a user-programmable manner. The main advantage is that patches allow you to take advantage of GPU tessellation, which can be a useful tool for some effects (especially subdivision surfaces) that would traditionally require re-generating the mesh on the CPU and pushing it to the GPU each frame. Unfortunately, patches and tessellation shaders are only available in recent versions of OpenGL (4.0, I think).

 

From the minimal research I've done on DirectX patches, they are fairly similar to OpenGL patches, but I'm not sure what all of the differences are. In some versions of DirectX, it appears that the number of vertices in a patch is more tightly restricted than in OpenGL 4, but the most recent versions are probably more flexible.

Share this post


Link to post
Share on other sites

Patches are going more to the GPU.  Get into the habit of sending as much 3D to the GPU in general.   Some developers avoid patches in favor of shader or bump map based solutions for performance reasons.

Share this post


Link to post
Share on other sites
I would like to see OpenGL to grow more mature because OpenGL can be programmed on the android mobile phones while DirectX can't.

 

I'm not aware of any major areas in which OpenGL is less "mature" than DirectX is. It's certainly less comprehensive because it only deals with graphics and not input, etc., but that doesn't make it any less powerful for graphics; you just need to use other libraries, such as SDL, alongside it. In the area it handles, which is just graphics, it's very mature and powerful as long as you're using a recent enough version.

 

Personally, I always use OpenGL for my projects because I hate being tied to one platform, and OpenGL has more comprehensive language bindings. With OpenGL, SDL, and optionally OpenAL, you should be able to write just about any type of game/simulation in a very cross-platform manner using just about any programming language.

Share this post


Link to post
Share on other sites

(Edit: This post was an accidental duplicate of the previous post caused by a database hiccup. Please ignore it.)

Edited by BLM768

Share this post


Link to post
Share on other sites
Sign in to follow this