X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fselect.cpp;h=60838e6857dd206cff99d15593d9f2bd3d71d5f3;hp=e989de4e99b59a931fc18cbd750656240acd513c;hb=84bc56b96c21c831104a22e0cbd0f3b72ab5d8c3;hpb=7adcad3b40a03000a82e32db4523761c218309b8 diff --git a/source/select.cpp b/source/select.cpp index e989de4e..60838e68 100644 --- a/source/select.cpp +++ b/source/select.cpp @@ -1,14 +1,21 @@ #include +#include "error.h" #include "select.h" using namespace std; -namespace Msp { -namespace GL { +namespace { + +using namespace Msp::GL; vector *select_buf=0; vector select_buf_int; +} + +namespace Msp { +namespace GL { + void select_buffer(vector &buf) { select_buf_int.resize(1024); @@ -38,8 +45,7 @@ void parse_select_records(const uint *buf, uint count, vector &tbu void _parse_internal_select_records(uint count) { if(!select_buf) - //XXX throw InvalidOperation(); - return; + throw InvalidOperation("No select buffer specified"); parse_select_records(&select_buf_int[0], count, *select_buf); }