#define _GL_HELPERS_HPP_
-#include <cassert>
-
+#include "os.hpp"
#include "glimports.hpp"
bytes = 4;
break;
default:
- assert(0);
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
bytes = 0;
}
case GL_FOG_COLOR:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_POSITION:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_LIGHT_MODEL_AMBIENT:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_AMBIENT_AND_DIFFUSE:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_TEXTURE_ENV_COLOR:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_EYE_PLANE:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_MAP1_VERTEX_4:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_MAP2_VERTEX_4:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_MAX_VARYING_FLOATS:
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS:
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+ case GL_MAX_GEOMETRY_UNIFORM_COMPONENTS:
+ case GL_MAX_GEOMETRY_OUTPUT_VERTICES:
+ case GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
/* case GL_TEXTURE_STENCIL_SIZE_EXT:*/
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_COLOR_TABLE_BIAS:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_COLOR_TABLE_BIAS:
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
return 4;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_HISTOGRAM_SINK:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_MINMAX_SINK:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_MAX_PROGRAM_LOOP_COUNT_NV:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_QUERY_RESULT_AVAILABLE_ARB:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_CURRENT_QUERY_ARB:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
return 3;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_PROGRAM_RESIDENT_NV:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_CURRENT_ATTRIB_NV:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
return 1;
default:
- assert(0);
- return 0;
+ OS::DebugMessage("warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);
+ return 1;
}
}
num_channels = 4;
break;
default:
- assert(0);
+ OS::DebugMessage("warning: %s: unexpected GLenum 0x%04X\n", __FUNCTION__, format);
num_channels = 0;
break;
}
bits_per_pixel = 32;
break;
default:
- assert(0);
+ OS::DebugMessage("warning: %s: unexpected GLenum 0x%04X\n", __FUNCTION__, type);
bits_per_pixel = 0;
break;
}