diff options
author | Brian Paul <[email protected]> | 2000-05-26 14:44:59 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-05-26 14:44:59 +0000 |
commit | 413d6a21f849a689b5c83ea04395856b44fc65a8 (patch) | |
tree | aae7c12c895ce970f4981c6a864216ee0c0c5cb7 /src/mesa/main/context.c | |
parent | 2c3a62013333fe624a431115c7913ae007bdd850 (diff) |
more work on GL_ARB_texture_cube_map
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 2fd0045c8c0..1fa5fb83813 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.69 2000/05/24 15:04:45 brianp Exp $ */ +/* $Id: context.c,v 1.70 2000/05/26 14:44:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -467,6 +467,14 @@ alloc_shared_state( void ) ss->DefaultD[d]->RefCount++; /* don't free if not in use */ } + ss->DefaultCubeMap = gl_alloc_texture_object(ss, 0, 6); + if (!ss->DefaultCubeMap) { + outOfMemory = GL_TRUE; + } + else { + ss->DefaultCubeMap->RefCount++; + } + if (!ss->DisplayList || !ss->TexObjects || outOfMemory) { /* Ran out of memory at some point. Free everything and return NULL */ if (ss->DisplayList) @@ -479,6 +487,8 @@ alloc_shared_state( void ) gl_free_texture_object(ss, ss->DefaultD[2]); if (ss->DefaultD[3]) gl_free_texture_object(ss, ss->DefaultD[3]); + if (ss->DefaultCubeMap) + gl_free_texture_object(ss, ss->DefaultCubeMap); FREE(ss); return NULL; } @@ -603,6 +613,7 @@ init_texture_unit( GLcontext *ctx, GLuint unit ) texUnit->CurrentD[1] = ctx->Shared->DefaultD[1]; texUnit->CurrentD[2] = ctx->Shared->DefaultD[2]; texUnit->CurrentD[3] = ctx->Shared->DefaultD[3]; + texUnit->CurrentCubeMap = ctx->Shared->DefaultCubeMap; } @@ -1835,7 +1846,7 @@ _mesa_get_dispatch(GLcontext *ctx) void gl_problem( const GLcontext *ctx, const char *s ) { fprintf( stderr, "Mesa implementation error: %s\n", s ); - fprintf( stderr, "Report to [email protected]\n" ); + fprintf( stderr, "Report to Mesa bug database at www.mesa3d.org\n" ); (void) ctx; } |