Simplified API, removed difference between vertex and fragment shaders.

This commit is contained in:
Branimir Karadžić 2014-03-29 19:42:57 -07:00
parent 2701350b7f
commit f436f79c10
30 changed files with 254 additions and 400 deletions
examples/05-instancing

View file

@ -157,11 +157,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
// Load vertex shader.
mem = loadShader("vs_instancing");
bgfx::VertexShaderHandle vsh = bgfx::createVertexShader(mem);
bgfx::ShaderHandle vsh = bgfx::createShader(mem);
// Load fragment shader.
mem = loadShader("fs_instancing");
bgfx::FragmentShaderHandle fsh = bgfx::createFragmentShader(mem);
bgfx::ShaderHandle fsh = bgfx::createShader(mem);
// Create program from shaders.
bgfx::ProgramHandle program = bgfx::createProgram(vsh, fsh);
@ -170,8 +170,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
// their reference is kept inside bgfx after calling createProgram.
// Vertex and fragment shader will be destroyed once program is
// destroyed.
bgfx::destroyVertexShader(vsh);
bgfx::destroyFragmentShader(fsh);
bgfx::destroyShader(vsh);
bgfx::destroyShader(fsh);
int64_t timeOffset = bx::getHPCounter();