Simplified API, removed difference between vertex and fragment shaders.
This commit is contained in:
parent
2701350b7f
commit
f436f79c10
30 changed files with 254 additions and 400 deletions
examples/05-instancing
|
@ -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();
|
||||
|
||||
|
|
Reference in a new issue