Engine Rendering pipeline : Making shaders generic

后端 未结 4 2083
广开言路
广开言路 2021-01-23 19:57

I am trying to make a 2D game engine using OpenGL ES 2.0 (iOS for now). I\'ve written Application layer in Objective C and a separate self contained RendererGLES20 in C++. No GL

4条回答
  •  感动是毒
    2021-01-23 20:06

    The whole point of shaders is to be specific. Generic APIs and inflation of the state machine poisoned OpenGL for a long time (just look at the OpenGL-1.5 glTexEnv). The whole point of modern OpenGL (v3 and beyond) was to get rid of this genericity, so that shaders could be tailored for the task at hand with easy. Don't think shaders to be something separate from the renderer code that uses them. In fact shaders and client side renderer code are complementary and are usually developed in unison.

提交回复
热议问题