From: Mikko Rasa Date: Mon, 16 Jun 2014 21:02:03 +0000 (+0300) Subject: Move extension requirements from ProgramData to UniformBlock X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=9b2e1d2c6fe27574f10016b154dddad4f511996d Move extension requirements from ProgramData to UniformBlock ProgramData no longer manipulates GL directly, and it's used in places like Renderer and Material. This changes allows those things to be used without shader support. --- diff --git a/source/programdata.cpp b/source/programdata.cpp index 12879140..bdbe4c1d 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -1,4 +1,3 @@ -#include #include "buffer.h" #include "color.h" #include "error.h" @@ -18,9 +17,7 @@ ProgramData::ProgramData(): last_block(0), buffer(0), changes(NO_CHANGES) -{ - static Require _req(ARB_shader_objects); -} +{ } // Blocks are intentionally left uncopied ProgramData::ProgramData(const ProgramData &other): diff --git a/source/uniformblock.cpp b/source/uniformblock.cpp index 6b9de269..498973f9 100644 --- a/source/uniformblock.cpp +++ b/source/uniformblock.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "buffer.h" #include "color.h" #include "error.h" @@ -14,13 +16,17 @@ namespace GL { UniformBlock::UniformBlock(): buf_range(0) -{ } +{ + static Require _req(ARB_shader_objects); +} UniformBlock::UniformBlock(unsigned s): size(s), data(size), buf_range(0) -{ } +{ + static Require _req(ARB_uniform_buffer_object); +} UniformBlock::~UniformBlock() {