Re: [PyOpenGL-Users] High Order glMap2 Error
Brought to you by:
mcfletch
From: Ian M. <ia...@ge...> - 2017-08-09 05:22:33
|
On Tue, Aug 8, 2017 at 7:39 AM, Shuai Jiang (Marshall) < mar...@gm...> wrote: > Oh goodness, yeah the max value is 8. Thanks for the input! It seems from > a cursory search that this value is pretty much hardwired into the OpenGL > implementation, and there's no way to increase it. > That's correct. > > When you say converting to a newer pipeline, do you mean moving to > tessellation instead to plot my patches? Sorry if this is a silly question, > I'm not very familiar with OpenGL. > It is a bit of a silly question, but you sortof have the right idea ;) OpenGL for a long time was GL 1 / GL 2 ("old-style GL"). These were developed gradually and slowly, maintaining backward compatibility when possible. Many (most, still?) online resources target the GL 2 API, in-particular. However, as the technology has developed, it became increasingly clear that the old-style API could not adequately represent the power of modern GPUs. Consequently, GL 3 was introduced, followed rapidly by GL 4 ("new-style GL"). The new-style API removes (at least in 4) much of the old functionality (such as e.g. `glVertex*(...)`), replacing it with new API calls that map better to the underlying hardware. The new-style API is usually more complex to use, particularly for beginners, but it's forward compatible and much faster. It also gives you complete flexibility, which is why I mentioned it. In particular, for handling patches, you'd draw with a primitive type of GL_PATCHES (GL_MAX_PATCH_VERTICES is required to be at least 32). The patch would then be subdivided by tessellation shaders to whatever degree and subdivision level you want (because you write those shaders yourself). So, flexibility, but it's a whole lot of learning/work if you don't know GL 4 pipelines yet. If this intrigues you, you may also want to check out Vulkan. Vulkan is a new graphics API written from the ground up, and provides the ultimate in flexibility and power. The downside is that it is (necessarily) extremely complex to use. Ian |