X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fprogram_backend.cpp;h=685f15421d6d726f34f6b73840a5f7ac96eb3e3f;hp=132ad1c05e823e5fd0da09887a9d54af82044638;hb=e70662d7812464159f2e47f4bebb69d88f89ae93;hpb=28d12c73b197a16f7635badc01e42375728fde85 diff --git a/source/backends/opengl/program_backend.cpp b/source/backends/opengl/program_backend.cpp index 132ad1c0..685f1542 100644 --- a/source/backends/opengl/program_backend.cpp +++ b/source/backends/opengl/program_backend.cpp @@ -46,6 +46,17 @@ OpenGLProgram::OpenGLProgram() id = glCreateProgram(); } +OpenGLProgram::OpenGLProgram(OpenGLProgram &&other): + id(other.id), + linked(other.linked), + uniform_calls(move(other.uniform_calls)), + debug_name(move(other.debug_name)) +{ + move(other.stage_ids, other.stage_ids+MAX_STAGES, stage_ids); + other.id = 0; + fill(other.stage_ids, other.stage_ids+MAX_STAGES, 0); +} + OpenGLProgram::~OpenGLProgram() { for(unsigned i=0; i