How do I draw a rainbow in Freeglut?

前端 未结 2 1282
死守一世寂寞
死守一世寂寞 2020-12-20 18:11

I\'m trying to draw a rainbow-coloured plot legend in openGL. Here is what I\'ve got so far:

glBegin(GL_QUADS);
for (int i = 0; i != legendElements; ++i)
{
          


        
2条回答
  •  别那么骄傲
    2020-12-20 18:58

    Well, not completely right. Here I made a javascript example of it. Sodium yellow (589nm) is too orange and Halpha red (656nm) is too brown....

    Save this example into an HTML file (jquery needed) and load it into a browser: page.html?l=[nanometers]

    
    
    
    
    
    

提交回复
热议问题