Lines Matching defs:texture
49 TRACE("(%p) : About to load texture.\n", This);
73 /* context_acquire() sets isInDraw to TRUE when loading a pbuffer into a texture,
86 /* TODO: This is not necessarily needed with hw palettized texture support. */
88 /* Make sure the texture is reloaded because of the palette change, this kills performance though :( */
94 /* If the texture is marked dirty or the srgb sampler setting has changed
124 /* Clean out the texture name we gave to the surface so that the
134 TRACE("(%p) : Cleaning up base texture\n", This);
212 /* Unload all the surfaces and reset the texture name. If UnLoad was called on the
341 * partial driver emulation, we're dealing with a GL_TEXTURE_2D texture which has the address mode set to repeat - something
343 * Even if the texture has only one mip level, the default LINEAR_MIPMAP_LINEAR filter causes a SW fallback on macos.
510 HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels,
530 WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
551 WARN("Attempted to create a mipmapped np2 texture without unconditional np2 support.\n");
581 texture->lpVtbl = &IWineD3DTexture_Vtbl;
583 hr = basetexture_init((IWineD3DBaseTextureImpl *)texture, levels, WINED3DRTYPE_TEXTURE,
595 /* Precalculated scaling for 'faked' non power of two texture coords.
597 * is used in combination with texture uploads (RTL_READTEX). The reason is that EXT_PALETTED_TEXTURE
601 texture->baseTexture.pow2Matrix[0] = 1.0f;
602 texture->baseTexture.pow2Matrix[5] = 1.0f;
603 texture->baseTexture.pow2Matrix[10] = 1.0f;
604 texture->baseTexture.pow2Matrix[15] = 1.0f;
605 texture->target = GL_TEXTURE_2D;
606 texture->cond_np2 = TRUE;
607 texture->baseTexture.minMipLookup = minMipLookup_noFilter;
613 if ((width != 1) || (height != 1)) texture->baseTexture.pow2Matrix_identity = FALSE;
615 texture->baseTexture.pow2Matrix[0] = (float)width;
616 texture->baseTexture.pow2Matrix[5] = (float)height;
617 texture->baseTexture.pow2Matrix[10] = 1.0f;
618 texture->baseTexture.pow2Matrix[15] = 1.0f;
619 texture->target = GL_TEXTURE_RECTANGLE_ARB;
620 texture->cond_np2 = TRUE;
622 if(texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
624 texture->baseTexture.minMipLookup = minMipLookup_noMip;
628 texture->baseTexture.minMipLookup = minMipLookup_noFilter;
635 texture->baseTexture.pow2Matrix_identity = FALSE;
636 texture->baseTexture.pow2Matrix[0] = (((float)width) / ((float)pow2_width));
637 texture->baseTexture.pow2Matrix[5] = (((float)height) / ((float)pow2_height));
641 texture->baseTexture.pow2Matrix[0] = 1.0f;
642 texture->baseTexture.pow2Matrix[5] = 1.0f;
645 texture->baseTexture.pow2Matrix[10] = 1.0f;
646 texture->baseTexture.pow2Matrix[15] = 1.0f;
647 texture->target = GL_TEXTURE_2D;
648 texture->cond_np2 = FALSE;
650 TRACE("xf(%f) yf(%f)\n", texture->baseTexture.pow2Matrix[0], texture->baseTexture.pow2Matrix[5]);
655 for (i = 0; i < texture->baseTexture.levels; ++i)
658 /* Use the callback to create the texture surface. */
660 usage, pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &texture->surfaces[i]
662 * this is done this way because the surface does not have its parent (texture) setup properly
663 * thus we can not initialize texture at this stage */
667 /* Use the callback to create the texture surface. */
669 usage, pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &texture->surfaces[i]);
674 FIXME("Failed to create surface %p, hr %#x\n", texture, hr);
675 texture->surfaces[i] = NULL;
676 texture_cleanup(texture);
680 IWineD3DSurface_SetContainer(texture->surfaces[i], (IWineD3DBase *)texture);
681 TRACE("Created surface level %u @ %p.\n", i, texture->surfaces[i]);
682 surface_set_texture_target(texture->surfaces[i], texture->target);
687 texture->baseTexture.internal_preload = texture_internal_preload;
690 if (VBOXSHRC_IS_SHARED(texture))
694 for (i = 0; i < texture->baseTexture.levels; ++i)
696 VBOXSHRC_COPY_SHAREDATA((IWineD3DSurfaceImpl*)texture->surfaces[i], texture);
699 for (i = 0; i < texture->baseTexture.levels; ++i)
701 Assert(!((IWineD3DSurfaceImpl*)texture->surfaces[i])->texture_name);
704 for (i = 0; i < texture->baseTexture.levels; ++i)
706 if (!VBOXSHRC_IS_SHARED_OPENED(texture))
708 IWineD3DSurface_LoadLocation(texture->surfaces[i], SFLAG_INTEXTURE, NULL);
710 *shared_handle = VBOXSHRC_GET_SHAREHANDLE(texture);
714 surface_setup_location_onopen((IWineD3DSurfaceImpl*)texture->surfaces[i]);
716 Assert(*shared_handle == VBOXSHRC_GET_SHAREHANDLE(texture));
720 for (i = 0; i < texture->baseTexture.levels; ++i)
722 Assert((GLuint)(*shared_handle) == ((IWineD3DSurfaceImpl*)texture->surfaces[i])->texture_name);
728 /* flush to ensure the texture is allocated/referenced before it is used/released by another