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. SVN revision: 1975
This commit is contained in:
parent
f467bc0d4a
commit
7e40e68d81
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,6 +221,7 @@ cb_close(void *data)
|
|||
cx = (GLXContext *)data;
|
||||
Epplet_unremember();
|
||||
Esync();
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue