Help with creating sponge out of cube

Hi Everyone,

I’m required to generate menger sponge in OpenGL 3.1 since it not longer supports GL_QUADS how can I subdivide triangle to get the look of menger sponge.

Any help would be appreciated

Just draw two triangles where you would have drawn a QUAD. Or just use a compatibility profile.

Hi Alfonso,

Thanks for the quick response. I have already generated the cube but don’t know how to make it look like menger sponge

Could you also explain what compatibility profile is and how can we include it

If you are on Windows, and you will be using Win32 code or MFC code or something of the sort, you check if WGL_ARB_create_context is present like this guy is doing.


Then everything from GL 1.0 up to GL 3.1 will be available to you.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.