Jesse-V / Folding-Atomata

3D simulation viewer for Folding@home
17 stars 6 forks source link

Render atoms as big points #50

Closed Jesse-V closed 11 years ago

Jesse-V commented 11 years ago

If an atom is rendered as a large point, then it should be less expensive for the GPU to render and for the driver to work with. To add the spot, a small mesh covering just that spot could be used. This should create the same effect but with much greater efficiency.

Some helpful links: http://www.processing.org/discourse/beta/num_1268967702.html http://www.gamedev.net/topic/333237-gl_points-size/ https://www.opengl.org/wiki/Category:Polygon_Offset http://stackoverflow.com/questions/11414713/opengl-gl-points-size http://stackoverflow.com/questions/4597020/how-can-i-vary-the-point-size-in-opengl-glbegingl-points http://www.processing.org/discourse/beta/num_1268967702.html

Jesse-V commented 11 years ago

glEnable(GL_PROGRAM_POINT_SIZE); float* range = new float[2]; glGetFloatv(GL_POINT_SIZE_RANGE, range); std::cout << range[0] << ", " << range[1] << std::endl;

returns 0 and 64, so if the point can only be up to a circle of size 64, this might not work.

Jesse-V commented 11 years ago

This doesn't look like it will practically work. I'm use a more traditional technique instead.