MSVC and TDMGCC fixes

This commit is contained in:
Charles J. Cliffe
2015-07-31 18:21:30 -04:00
parent c1774ee96a
commit 3fbb1def49
15 changed files with 219 additions and 211 deletions
+8 -8
View File
@@ -9,9 +9,9 @@ GLPanel::GLPanel() : fillType(GLPANEL_FILL_SOLID), contentsVisible(true), transf
pos[1] = 0.0f;
size[0] = 1.0f;
size[1] = 1.0f;
fill[0] = RGB(0.5,0.5,0.5);
fill[1] = RGB(0.1,0.1,0.1);
borderColor = RGB(0.8, 0.8, 0.8);
fill[0] = RGB3f(0.5,0.5,0.5);
fill[1] = RGB3f(0.1,0.1,0.1);
borderColor = RGB3f(0.8, 0.8, 0.8);
setCoordinateSystem(GLPANEL_Y_UP);
}
@@ -31,7 +31,7 @@ void GLPanel::genArrays() {
max, min
};
RGB c[4];
RGB3f c[4];
if (fillType == GLPANEL_FILL_SOLID) {
c[0] = c[1] = c[2] = c[3] = fill[0];
@@ -58,7 +58,7 @@ void GLPanel::genArrays() {
glColors.reserve(3 * 8);
glColors.resize(3 * 8);
RGB c[8];
RGB3f c[8];
if (fillType == GLPANEL_FILL_GRAD_BAR_X) {
float pts[2 * 8] = {
@@ -173,12 +173,12 @@ void GLPanel::setFill(GLPanelFillType fill_mode) {
genArrays();
}
void GLPanel::setFillColor(RGB color1) {
void GLPanel::setFillColor(RGB3f color1) {
fill[0] = color1;
genArrays();
}
void GLPanel::setFillColor(RGB color1, RGB color2) {
void GLPanel::setFillColor(RGB3f color1, RGB3f color2) {
fill[0] = color1;
fill[1] = color2;
genArrays();
@@ -189,7 +189,7 @@ void GLPanel::setMarginPx(float marg) {
}
void GLPanel::setBorderColor(RGB clr) {
void GLPanel::setBorderColor(RGB3f clr) {
borderColor = clr;
}
+5 -5
View File
@@ -42,8 +42,8 @@ public:
GLPanelCoordinateSystem coord;
float marginPx;
GLPanelEdges borderPx;
RGB fill[2];
RGB borderColor;
RGB3f fill[2];
RGB3f borderColor;
bool contentsVisible;
CubicVR::mat4 transform;
CubicVR::mat4 localTransform;
@@ -68,11 +68,11 @@ public:
void setCoordinateSystem(GLPanelCoordinateSystem coord);
void setFill(GLPanelFillType fill_mode);
void setFillColor(RGB color1);
void setFillColor(RGB color1, RGB color2);
void setFillColor(RGB3f color1);
void setFillColor(RGB3f color1, RGB3f color2);
void setMarginPx(float marg);
void setBorderColor(RGB clr);
void setBorderColor(RGB3f clr);
void setBorderPx(float bord);
void setBorderPx(float bordl, float bordr, float bordt, float bordb);
+6 -6
View File
@@ -9,30 +9,30 @@ PrimaryGLContext(canvas, sharedContext) {
testPanel.setSize(1.0, 1.0);
testPanel.setMarginPx(10);
testPanel.setFill(GLPanel::GLPANEL_FILL_GRAD_BAR_Y);
testPanel.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0));
testPanel.setFillColor(RGB3f(0.0,0.0,1.0), RGB3f(0.0,1.0,0.0));
testChildPanel.setPosition(0.0, 0.0);
testChildPanel.setMarginPx(5);
testChildPanel.setSize(1.0, 0.33);
testChildPanel.setCoordinateSystem(GLPanel::GLPANEL_Y_DOWN_ZERO_ONE);
testChildPanel.setFill(GLPanel::GLPANEL_FILL_GRAD_BAR_X);
testChildPanel.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0));
testChildPanel.setFillColor(RGB3f(0.0,0.0,1.0), RGB3f(0.0,1.0,0.0));
testChildPanel.setBorderPx(1);
testChildPanel2.setPosition(0.0, -0.66);
testChildPanel2.setSize(1.0, 0.33);
testChildPanel2.setMarginPx(5);
testChildPanel2.setFill(GLPanel::GLPANEL_FILL_GRAD_X);
testChildPanel2.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0));
testChildPanel2.setBorderColor(RGB(1.0,0.0,0.0));
testChildPanel2.setFillColor(RGB3f(0.0,0.0,1.0), RGB3f(0.0,1.0,0.0));
testChildPanel2.setBorderColor(RGB3f(1.0,0.0,0.0));
testChildPanel2.setBorderPx(1);
testChildPanel3.setPosition(0.0, 0.66);
testChildPanel3.setSize(1.0, 0.33);
testChildPanel3.setMarginPx(5);
testChildPanel3.setFill(GLPanel::GLPANEL_FILL_GRAD_X);
testChildPanel3.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0));
testChildPanel3.setBorderColor(RGB(1.0,0.0,0.0));
testChildPanel3.setFillColor(RGB3f(0.0,0.0,1.0), RGB3f(0.0,1.0,0.0));
testChildPanel3.setBorderColor(RGB3f(1.0,0.0,0.0));
testChildPanel3.setBorderPx(1);
testText1.setText("Testing 123..");