namespace {
-vector<Msp::GL::SelectRecord> *select_buf=0;
-vector<Msp::GL::uint> select_buf_int;
+vector<Msp::GL::SelectRecord> *select_buf = 0;
+vector<unsigned> select_buf_int;
}
{
select_buf_int.resize(1024);
glSelectBuffer(select_buf_int.size(), &select_buf_int[0]);
- select_buf=&buf;
+ select_buf = &buf;
}
-void parse_select_records(const uint *buf, uint count, vector<SelectRecord> &tbuf)
+void init_names()
{
- uint i=0;
+ glInitNames();
+}
+
+void push_name(unsigned n)
+{
+ glPushName(n);
+}
+
+void pop_name()
+{
+ glPopName();
+}
+
+void load_name(unsigned n)
+{
+ glLoadName(n);
+}
+
+void parse_select_records(const unsigned *buf, unsigned count, vector<SelectRecord> &tbuf)
+{
+ unsigned i = 0;
while(count--)
{
SelectRecord record;
- uint n_names=buf[i++];
- record.min_depth=buf[i++];
- record.max_depth=buf[i++];
+ unsigned n_names = buf[i++];
+ record.min_depth = buf[i++];
+ record.max_depth = buf[i++];
record.names.reserve(n_names);
while(n_names--)
}
}
-void _parse_internal_select_records(uint count)
+void _parse_internal_select_records(unsigned count)
{
if(!select_buf)
throw InvalidState("No select buffer specified");