Since evaluators have been deprecated (removed in the core profile), I want to know what alternates do i have?
From my preliminary search (using google and this forum), it seems I would have to roll my own patch/surface renderer. If this is the case, are there any available resources online that might help me with this preferrably in opengl 3.3 or above?
I have a set of points representing the surface but all of the opengl code (for rendering them as patches) that I have found online uses evaluators.
I never bothered to really look at evaluators, but weren’t they supposed to do similar stuff, that tesselation does now? Only more hardwired? If so, searching for resources about tesselation might give you some input.
Thanks Alfonse. But i was asking if i want to stick with the core profile and want to do what evaluators are doing, how would i do it. In other words what is the alternate of evaluators in the modern OpnGL (core profile). Tesselation shader seems to be one answer is there any other alternate.
One of the reasons for the removal of functionality from OpenGL was to keep OpenGL focused on functionality that reflected what the hardware was capable of. The old evaluators were never implemented in hardware, so they were removed. There was no replacement for them until 4.x because there was no hardware to replace them until 4.x/Direct3D11-class hardware came out.
Thus, if you need evaluators, you have two options. Write them yourself, or use the compatibility profile. And if you write it yourself, how you do so depends mostly on your needs. Do you need the feature to be exactly what the old evaluators provided, or do you only need a focused subset? Since you’re writing it yourself, you can give it any API you want.
Oh ok thanks for that yeah i was thinking of maybe using geometry shaders to do basic bezier surface but i am not sure how it will behave performance wise any ideas if i use geometry shaders to generate surface would it have significant impact on performance?
Hmm so now what other option do i have? I want to use the core profile so I cannot use evaluators. And as you say it is going to hit perfromance if i use geometry shaders esp. on the opnGL 3.x class hardware that i have. I guess I would have to stick with custom tesselation and glBufferSubData to update new vertices on the vertex buffer object.
You could always upload a very high-res mesh with some additional data at the vertices and then do the rest just in the vertex-shader.
You could upgrade to DX11 class hardware and do it with tesselation.
Geometry shaders are not really fast, if you output lots of new triangles, but doing just a bit of subdivision is doable. So you could use a higher-resolution base-mesh and just add the final touches in the GS and it should be fast enough.
I would start with the option that you can get to work the easiest. Possibly a pure CPU implementation. Once you got it working you can try out different methods and see how fast they are. Also just using a very high-res mesh and doing all the work in the VS might be a good idea to just get it working and to check out the performance base-line, so that you have some numbers to compare the rest with.
In the future you would probably migrate it to use tesselation, so keeping an eye out for how that works is always a good idea. On the other hand, if this is just a small pet project to fiddle around with some idea, it really doesn’t matter how exactly you implement it now, it’s the experience you gain, that has the most value.