Task
Perform many hit-tests on polygons. I have about 10,000 polygons with 1,000 points each. About 100,000,000 hit-tests will be performed against these polygons. The polygons may touch each other but never overlap.
Solution
Simple point-in-polygon test for every hit-test.
Problem
Far too slow.
Improvement
Rasterize the polygons and check which polygon the pixel of the hit-tests belongs to.
New problem
Rasterization of the polygons is slow. I'm using this algorithm: http://alienryderflex.com/polygon_fill/
Idea
Rasterize the polygons on the GPU since it's optimized for this task and can perform it in hardware.
Question
What do you think about my idea and can you give me advice where to start? Will it lead to high performance?
Sidenote
The area is sparsly covered with polygons. I want to maintain a list of pixels instead of a bitmap.