diff --git a/ChangeLog b/ChangeLog index e684e97..2ec8d29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1883,3 +1883,11 @@ Altered the api so that you can define ALL the nitty gritty GLX stuf like accumulation buffers for red, green, blue, alpha channels, depth buffers, stencil buffers, ect. I'll Add default easier to use calls next. +------------------------------------------------------------------------------- + +Tue Jan 25 15:55:11 CST 2000 +(thebard) + +Added Epplet_default_bind_GL, a quick and dirty default binding for people +to use if the new Epplet_bind_double_GL confuses the hell out of em and they +dont need Epplet_bind_double_GL various buffer settings. diff --git a/api/epplet.c b/api/epplet.c index 7f46d84..28336d5 100644 --- a/api/epplet.c +++ b/api/epplet.c @@ -5019,6 +5019,12 @@ Epplet_bind_single_GL(Epplet_gadget da, int red, int green, int blue, return cx; } +GLXContext +Epplet_default_bind_GL(Epplet_gadget da) +{ + return Epplet_bind_double_GL(da, 1, 1, 1, 0, 0, 8, 0, 0, 0, 0, 0); +} + void Epplet_unbind_GL(GLXContext cx) { diff --git a/api/epplet.h.in b/api/epplet.h.in index 1eb8d64..1b8f500 100644 --- a/api/epplet.h.in +++ b/api/epplet.h.in @@ -541,6 +541,13 @@ GLXContext Epplet_bind_single_GL(Epplet_gadget da, int red, int stencil, int accum_red, int accum_green, int accum_blue, int accum_alpha); +/* This is the "quick" way to define and bind a "good enough" context. + The idea here is that this context should give you a basic RGB + double buffer with minimal depth buffer, and NO other buffers. Its very + basic, but its good enough for simple rendering with light sources + and basic texture mapping. */ +GLXContext Epplet_default_bind_GL(Epplet_gadget da); + /* Destroy (unbind) a glx context. */ void Epplet_unbind_GL(GLXContext cx); diff --git a/epplets/E-OpenGL-Demo.c b/epplets/E-OpenGL-Demo.c index 95a6f2e..a22fdad 100644 --- a/epplets/E-OpenGL-Demo.c +++ b/epplets/E-OpenGL-Demo.c @@ -194,7 +194,7 @@ draw_rotating(void) glLightfv(GL_LIGHT0, GL_POSITION, light_position); glPushMatrix(); - glRotatef(gSpin, .5, 1, .5); + glRotatef(gSpin, 1, 1, .1); glCallList(gObjectList); glPopMatrix(); @@ -221,7 +221,8 @@ cb_close(void *data) cx = (GLXContext *)data; Epplet_unremember(); Esync(); - Epplet_unbind_GL(*cx); + if(cx != NULL) + Epplet_unbind_GL(*cx); exit(0); } @@ -379,7 +380,12 @@ main(int argc, char **argv) load_conf(); - cx = Epplet_bind_double_GL(da, 1, 1, 1, 0, 0, 8, 0, 0, 0, 0, 0); + cx = Epplet_default_bind_GL(da); + /* This could also be done as: + cx = Epplet_bind_double_GL(da, 1, 1, 1, 0, 0, 8, 0, 0, 0, 0, 0); */ + + if(cx == NULL) + cb_close(NULL); /* To properly center the viewport, -2, -2 isntead of 0, 0 must be used. Why? I have no freak'n idea. For some reason in Ortho everything is