| 9 | using namespace CubicVR; |
| 10 | |
| 11 | GLPanel::GLPanel() : fillType(GLPANEL_FILL_SOLID), contentsVisible(true), visible(true), transform(mat4::identity()) { |
| 12 | pos[0] = 0.0f; |
| 13 | pos[1] = 0.0f; |
| 14 | rot[0] = 0.0f; |
| 15 | rot[1] = 0.0f; |
| 16 | rot[2] = 0.0f; |
| 17 | size[0] = 1.0f; |
| 18 | size[1] = 1.0f; |
| 19 | fill[0] = RGBA4f(0.5f,0.5f,0.5f); |
| 20 | fill[1] = RGBA4f(0.1f,0.1f,0.1f); |
| 21 | borderColor = RGBA4f(0.8f, 0.8f, 0.8f); |
| 22 | setCoordinateSystem(GLPANEL_Y_UP); |
| 23 | setMarginPx(0); |
| 24 | setBorderPx(0); |
| 25 | srcBlend = GL_SRC_ALPHA; |
| 26 | dstBlend = GL_ONE_MINUS_SRC_ALPHA; |
| 27 | } |
| 28 | |
| 29 | void GLPanel::genArrays() { |
| 30 | float gmin = -1.0, gmid = 0, gmax = 1.0; |