コード例 #1
0
ファイル: mgatex.c プロジェクト: aosm/X11
void
mgaDDInitTextureFuncs( GLcontext *ctx )
{
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);


   ctx->Driver.ChooseTextureFormat	= mgaChooseTextureFormat;
   ctx->Driver.TexImage1D		= _mesa_store_teximage1d;
   ctx->Driver.TexImage2D		= mgaTexImage2D;
   ctx->Driver.TexImage3D		= _mesa_store_teximage3d;
   ctx->Driver.TexSubImage1D		= _mesa_store_texsubimage1d;
   ctx->Driver.TexSubImage2D		= mgaTexSubImage2D;
   ctx->Driver.TexSubImage3D		= _mesa_store_texsubimage3d;
   ctx->Driver.CopyTexImage1D		= _swrast_copy_teximage1d;
   ctx->Driver.CopyTexImage2D		= _swrast_copy_teximage2d;
   ctx->Driver.CopyTexSubImage1D	= _swrast_copy_texsubimage1d;
   ctx->Driver.CopyTexSubImage2D	= _swrast_copy_texsubimage2d;
   ctx->Driver.CopyTexSubImage3D	= _swrast_copy_texsubimage3d;
   ctx->Driver.TestProxyTexImage	= _mesa_test_proxy_teximage;

   ctx->Driver.BindTexture		= mgaDDBindTexture;
   ctx->Driver.CreateTexture		= NULL; /* FIXME: Is this used??? */
   ctx->Driver.DeleteTexture		= mgaDDDeleteTexture;
   ctx->Driver.IsTextureResident	= driIsTextureResident;
   ctx->Driver.PrioritizeTexture	= NULL;
   ctx->Driver.ActiveTexture		= NULL;
   ctx->Driver.UpdateTexturePalette	= NULL;

   ctx->Driver.TexEnv			= mgaDDTexEnv;
   ctx->Driver.TexParameter		= mgaDDTexParameter;

   driInitTextureObjects( ctx, & mmesa->swapped,
                          (DRI_TEXMGR_DO_TEXTURE_2D |
                           DRI_TEXMGR_DO_TEXTURE_RECT) );
}
コード例 #2
0
ファイル: i810tex.c プロジェクト: aosm/X11
void i810InitTextureFuncs( GLcontext *ctx )
{
   i810ContextPtr imesa = I810_CONTEXT(ctx);

   ctx->Driver.TexEnv = i810TexEnv;
   ctx->Driver.ChooseTextureFormat = i810ChooseTextureFormat;
   ctx->Driver.TexImage1D = _mesa_store_teximage1d;
   ctx->Driver.TexImage2D = i810TexImage2D;
   ctx->Driver.TexImage3D = _mesa_store_teximage3d;
   ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d;
   ctx->Driver.TexSubImage2D = i810TexSubImage2D;
   ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d;
   ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d;
   ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d;
   ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d;
   ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d;
   ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d;
   ctx->Driver.BindTexture = i810BindTexture;
   ctx->Driver.DeleteTexture = i810DeleteTexture;
   ctx->Driver.TexParameter = i810TexParameter;
   ctx->Driver.UpdateTexturePalette = 0;
   ctx->Driver.IsTextureResident = driIsTextureResident;
   ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage;

   driInitTextureObjects( ctx, &imesa->swapped, DRI_TEXMGR_DO_TEXTURE_2D);

}
コード例 #3
0
ファイル: r300_tex.c プロジェクト: Magister/x11rdp_xorg71
void r300InitTextureFuncs(struct dd_function_table *functions)
{
	/* Note: we only plug in the functions we implement in the driver
	 * since _mesa_init_driver_functions() was already called.
	 */
	functions->ChooseTextureFormat = r300ChooseTextureFormat;
	functions->TexImage1D = r300TexImage1D;
	functions->TexImage2D = r300TexImage2D;
#if ENABLE_HW_3D_TEXTURE
	functions->TexImage3D = r300TexImage3D;
#else
	functions->TexImage3D = _mesa_store_teximage3d;
#endif
	functions->TexSubImage1D = r300TexSubImage1D;
	functions->TexSubImage2D = r300TexSubImage2D;
#if ENABLE_HW_3D_TEXTURE
	functions->TexSubImage3D = r300TexSubImage3D;
#else
	functions->TexSubImage3D = _mesa_store_texsubimage3d;
#endif
	functions->NewTextureObject = r300NewTextureObject;
	functions->BindTexture = r300BindTexture;
	functions->DeleteTexture = r300DeleteTexture;
	functions->IsTextureResident = driIsTextureResident;

	functions->TexEnv = r300TexEnv;
	functions->TexParameter = r300TexParameter;
	
	functions->CompressedTexImage2D	= r300CompressedTexImage2D;
	functions->CompressedTexSubImage2D	= r300CompressedTexSubImage2D;

	driInitTextureFormats();

#if 0
	/* moved or obsolete code */
	r300ContextPtr rmesa = R300_CONTEXT(ctx);
	driInitTextureObjects(ctx, &rmesa->swapped,
			      DRI_TEXMGR_DO_TEXTURE_1D
			      | DRI_TEXMGR_DO_TEXTURE_2D);

	/* Hack: r300NewTextureObject is not yet installed when the
	 * default textures are created. Therefore set MaxAnisotropy of the
	 * default 2D texture now. */
	ctx->Shared->Default2D->MaxAnisotropy =
	    driQueryOptionf(&rmesa->optionCache, "def_max_anisotropy");
#endif
}