X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fselect.cpp;h=486ffbeddd2f483cfe4e93a33a0de4fc100533a1;hb=5318aa4fd553be4ce0bc428e73592b787842cdea;hp=e989de4e99b59a931fc18cbd750656240acd513c;hpb=7adcad3b40a03000a82e32db4523761c218309b8;p=libs%2Fgl.git diff --git a/source/select.cpp b/source/select.cpp index e989de4e..486ffbed 100644 --- a/source/select.cpp +++ b/source/select.cpp @@ -1,14 +1,28 @@ +/* $Id$ + +This file is part of libmspgl +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include +#include "except.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 +52,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); }