Commit 41ba0ac3 authored by Jan Möbius's avatar Jan Möbius

Dennis:

Use-draw-arrays-during-picking-to-optimize-display-lists



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5911 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6154bbb5
......@@ -863,6 +863,15 @@ void GLState::pick_set_name (unsigned int _idx)
//-----------------------------------------------------------------------------
Vec4uc GLState::pick_get_name_color (unsigned int _idx)
{
if (colorPicking_)
return colorStack_.getIndexColor (_idx);
return Vec4uc (0, 0, 0, 0);
}
//-----------------------------------------------------------------------------
void GLState::pick_push_name (unsigned int _idx)
{
colorStack_.pushIndex (_idx);
......
......@@ -382,6 +382,9 @@ public:
/// sets the current name/color
void pick_set_name (unsigned int _idx);
/// get the current color for index
Vec4uc pick_get_name_color (unsigned int _idx);
/// creates a new name the stack
void pick_push_name (unsigned int _idx);
......
This diff is collapsed.
......@@ -163,6 +163,9 @@ protected:
// pick anything
void pick_any(GLState& _state);
// update pick buffer sizes
void update_pick_buffers ();
// opengl vertex array stuff
enum ArrayType
{
......@@ -234,6 +237,10 @@ private:
unsigned int edgeBaseIndex_;
unsigned int anyBaseIndex_;
// buffers for draw arrays during picking
std::vector< ACG::Vec3f > pickVertexBuf_;
std::vector< ACG::Vec4uc > pickColorBuf_;
// bounding box
Vec3f bbMin_;
Vec3f bbMax_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment