Visual *
createVisual(bool doubleBuffer, Profile profile) {
if (profile != PROFILE_COMPAT &&
- profile != PROFILE_CORE) {
+ profile != PROFILE_CORE &&
+ profile != PROFILE_ES2) {
return NULL;
}
switch (profile) {
case PROFILE_COMPAT:
break;
+ case PROFILE_ES2:
+ attribs.add(GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_ES2_PROFILE_BIT_EXT);
+ break;
case PROFILE_CORE:
// XXX: This will invariable return a 3.2 context, when supported.
// We probably should have a PROFILE_CORE_XX per version.
Visual *
createVisual(bool doubleBuffer, Profile profile) {
if (profile != PROFILE_COMPAT &&
- profile != PROFILE_CORE) {
+ profile != PROFILE_CORE &&
+ profile != PROFILE_ES2) {
return NULL;
}
createContext(const Visual *visual, Context *shareContext, Profile profile, bool debug)
{
if (profile != PROFILE_COMPAT &&
- profile != PROFILE_CORE) {
+ profile != PROFILE_CORE &&
+ profile != PROFILE_ES2) {
return NULL;
}
- if (profile == PROFILE_CORE) {
+ switch (profile)
+ {
+ case PROFILE_CORE:
std::cerr << "warning: ignoring OpenGL core profile request\n";
+ break;
+
+ case PROFILE_ES2:
+ std::cerr << "warning: ignoring OpenGL ES 2.0 profile request\n";
+ break;
}
return new WglContext(visual, profile, static_cast<WglContext *>(shareContext));