]> Pileus Git - grits/commit - src/grits-opengl.c
Add mouse enter/leave signals to objects
authorAndy Spencer <andy753421@gmail.com>
Sat, 15 Oct 2011 06:13:39 +0000 (06:13 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 15 Oct 2011 06:13:39 +0000 (06:13 +0000)
commit1d0635977583ad84faaa1978f1fd78fa3ec83052
tree5d2b9be1e408822a1944c08db11a18961010cf66
parent3d5aab9907082844afa9c1f5d28ef0b44d5fa74a
Add mouse enter/leave signals to objects

This uses the OpenGL Selection render mode to determine which objects
the mouse is over. It requires fairly tight integration between
GritsOpenGL and GritsObject.

The signal code is handled internally by GritsObject. However, most of
the actual selection matching work is done by GritsOpenGL.

Object types that wish to improve performance can implement the pick()
function in addition to the draw() function. The pick function is used
when performing selection matching. It works similar to draw, but does
not need to do textures/lighting/opacity/etc.
src/grits-opengl.c
src/objects/grits-object.c
src/objects/grits-object.h
src/objects/grits-poly.c