Questions tagged [textures]

Textures are series of images used in computer graphics to associate locations on a visible surface with varying values. This association is typically done by mapping locations on the texture (usually two-dimensional, but other dimensions and types of textures exist) to locations on the rendered surface. Filtering is often used to smooth away aliasing when sampling values from the texture, usually involving multiple images within a texture called mipmaps.

In 3D graphics, the digital representation of the surface of an object. In addition to two-dimensional qualities, such as color and brightness, a texture is also encoded with three-dimensional properties, such as how transparent and reflective the object is. Once a texture has been defined, it can be wrapped around any 3-dimensional object. This is called texture mapping.

Well-defined textures are very important for rendering realistic 3-D images. However, they also require a lot of memory, so they're not used as often as they might be. This is one of the rationales for the development of the new graphics interface, AGP, which allows texture to be stored in main memory, which is more expansive than video memory. AGP also speeds up the transfer of large textures between memory, the CPU and the video adapter.

5888 questions
2
votes
3 answers

Texture loading at JOGL

I've been trying to load a bmp picture to use it as a texture at my program I've used a IOStream class to extend DataInputStream to read the pixels at the photo with this code based on a texture loader code for C++: //class Data members public…
Nour
  • 21
  • 1
  • 3
2
votes
1 answer

What texture dimensions can OpenGL handle

I've heard that you need power of two texture dimensions for it to work in OpenGL. However, I've been able to load textures which are 200x200 and 300x300 (not powers of 2). Meanwhile when I tried to load a texture that is 512x512 (powers of two)…
0ctoDragon
  • 541
  • 1
  • 7
  • 20
2
votes
2 answers

Loaded png textures from libpng shows up black in OpenGL

I am currently attempting to load a png image using libpng, and then convert it into an OpenGL texture that is then drawn. Now, first of all, to do a quick test to see if any textures would get drawn a simple test quad, I made this…
CodingBeagle
  • 1,888
  • 2
  • 24
  • 52
2
votes
4 answers

webgl - babylonjs skybox texture not showing

I have a problem with a texture of a skybox made in webgl using babylonjs. My whole project is on the webserver and everything seemd to be good written but the box which should be a skybox doesn't show the texture - black outside and…
user3166894
  • 21
  • 1
  • 2
2
votes
2 answers

Loading a texture from file post DX11.1?

In 11.1 and later Microsoft removed a lot of helpers for loading textures (fromfile, fromstream etc). I'm trying to port my code over to 11.2 and everything works fine except for this line : var texture = Texture2D.FromFile(device,…
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78
2
votes
1 answer

IDirect3DDevice9, setting how textures scale?

In Photoshop you can control how pictures are scaled up and down as 'image interpolation', it has different options like 'Bicubic', 'Bilinear', 'Nearest Neighbour' and such. I was wondering if I could do something similar in DirectX? Basically if I…
meds
  • 21,699
  • 37
  • 163
  • 314
2
votes
1 answer

Texture not mapping to square correctly WebGL

For some reason why i map the texture to the boxes i have drawn on the 3d canvas it is not showing correctly, all i get is a blue box and not the full texture.