glo_init();
// new surface
context = glo_context_create(bufferFlags, 0);
+ if (context == NULL)
+ return 1;
surface = glo_surface_create(TX, TY, context);
+ if (surface == NULL)
+ return 1;
glo_surface_makecurrent(surface);
printf("GL VENDOR %s\n", glGetString(GL_VENDOR));
printf("GL RENDERER %s\n", glGetString(GL_RENDERER));
}
context = glo_context_create(bufferFlags, 0);
+ if (context == NULL)
+ return 1;
surface = glo_surface_create(TX, TY, context);
+ if (surface == NULL)
+ return 1;
glo_surface_makecurrent(surface);
// Client doesnt know surface is new - need to MakeCurrent
if(process->current_state == qsurface->glstate) {
glo_surface_makecurrent(qsurface->surface);
+ // set the viewport while the window size is changed. It is needed
+ // especially for the case that glViewport is not explicitly called
+ // in program. In this case, the viewport is set to incorrectly
+ // in the first MakeCurrent when the window size is not known.
+ // It will not impact normal GL programs with glViewport set as
+ // programmers want.
+ glViewport (0, 0, w, h);
}
else {
DEBUGF("Error: Surface is not current! %p %p\n",
s++, (*n)--;
} while (*n > 2 && (s[1] != '*' || s[2] != '/'));
s++, (*n)--;
+ s++, (*n)--;
+ if (*n == 0) {
+ break;
+ }
+ } else {
+ break;
}
}
}
ret = malloc(retlen + 1);
p = ret;
+ if (retlen == 0) {
+ *p = 0;
+ return;
+ }
+
while (retlen > 0) {
if (*start == '/' && retlen > 1) {
if (start[1] == '/') {