X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Fsidebysidecombiner.cpp;h=213b5448249b894736d392e55c741235d10e438b;hp=b9d1d89c243023faf1def099df849dc7b05b8d56;hb=5244110fa8d347b8539f4fcff1bea729eecc2027;hpb=3d83f3acedfdd428807313986eefaf5bcd64b7e8 diff --git a/source/sidebysidecombiner.cpp b/source/sidebysidecombiner.cpp index b9d1d89..213b544 100644 --- a/source/sidebysidecombiner.cpp +++ b/source/sidebysidecombiner.cpp @@ -1,6 +1,6 @@ -#include "meshbuilder.h" +#include +#include #include "sidebysidecombiner.h" -#include "texture2d.h" namespace { @@ -24,10 +24,10 @@ const char fs_source[] = } namespace Msp { -namespace GL { +namespace VR { SideBySideCombiner::SideBySideCombiner(bool c): - mesh(VERTEX2), + mesh(GL::VERTEX2), shprog(vs_source, fs_source) { width_div = 2; @@ -37,8 +37,8 @@ SideBySideCombiner::SideBySideCombiner(bool c): set_cross_eyed(c); - MeshBuilder bld(mesh); - bld.begin(TRIANGLE_STRIP); + GL::MeshBuilder bld(mesh); + bld.begin(GL::TRIANGLE_STRIP); bld.vertex(-1, 1); bld.vertex(-1, -1); bld.vertex(1, 1); @@ -54,11 +54,11 @@ void SideBySideCombiner::set_cross_eyed(bool c) right_shdata.uniform("offset", m); } -void SideBySideCombiner::render(const Texture2D &left, const Texture2D &right) const +void SideBySideCombiner::render(const GL::Texture2D &left, const GL::Texture2D &right) const { - Bind bind_shprog(shprog); + GL::Bind bind_shprog(shprog); - Bind bind_tex(left); + GL::Bind bind_tex(left); left_shdata.apply(); mesh.draw(); @@ -67,5 +67,5 @@ void SideBySideCombiner::render(const Texture2D &left, const Texture2D &right) c mesh.draw(); } -} // namespace GL +} // namespace VR } // namespace Msp