3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
16 vector<Msp::GL::SelectRecord> *select_buf = 0;
17 vector<unsigned> select_buf_int;
24 void select_buffer(vector<SelectRecord> &buf)
26 select_buf_int.resize(1024);
27 glSelectBuffer(select_buf_int.size(), &select_buf_int[0]);
36 void push_name(unsigned n)
46 void load_name(unsigned n)
51 void parse_select_records(const unsigned *buf, unsigned count, vector<SelectRecord> &tbuf)
58 unsigned n_names = buf[i++];
59 record.min_depth = buf[i++];
60 record.max_depth = buf[i++];
62 record.names.reserve(n_names);
64 record.names.push_back(buf[i++]);
66 tbuf.push_back(record);
70 void _parse_internal_select_records(unsigned count)
73 throw InvalidState("No select buffer specified");
74 parse_select_records(&select_buf_int[0], count, *select_buf);