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
16
votes
1 answer

How to copy texture1 to texture2 efficiently?

I want to copy texture1 to texture2. The most stupid way is copying tex1 data from GPU to CPU, and then copy CPU data to GPU. The stupid code is as below: float *data = new float[width*height*4]; glBindTexture(GL_TEXTURE_2D,…
rtrobin
  • 270
  • 2
  • 11
15
votes
1 answer

Programmatically creating directx 11 textures, pros and cons of the three different methods

The msdn documentation explains that in directx 11 there are multiple ways to fill a directx 11 texture programmatically: (1) Create the texture with default usage texture and initialize it with data from memory (2) Create the texture with dynamic…
user334911
15
votes
4 answers

Binding textures in OpenGL

So I'm rendering my scene in batches, to try and minimize state changes. Since my shaders usually need multiple textures, I have a few of them bound at the same time to different texture units. Some of these textures are used in multiple batches, so…
Hannesh
  • 7,256
  • 7
  • 46
  • 80
15
votes
2 answers

How can I find the maximum texture size for different phones?

I'm trying to find out the maximum texture size for the original Motorola Droid. I believe the G1 has a maximum texture size of 512, but it would be nice if there was a more official way I could find out so I can build a proper tile system.
jfisk
  • 6,125
  • 20
  • 77
  • 113
15
votes
2 answers

CSS3 Radial Gradients with RGBA()

I am working on a website which uses multiple css3 gradients as overlay for a background tiled with texture image site url: --snipped-- currently for header i am using following css: #header { background: #DBD6D3; height: 364px; background:…
Tarun
  • 5,374
  • 4
  • 22
  • 32
15
votes
4 answers

Can OpenGL ES render textures of non base 2 dimensions?

This is just a quick question before I dive deeper into converting my current rendering system to openGL. I heard that textures needed to be in base 2 sizes in order to be stored for rendering. Is this true? My application is very tight on memory,…
Kleptine
  • 5,089
  • 16
  • 58
  • 81
15
votes
2 answers

CUDA cube map textures

How to deal with OpenGL cube map textures in CUDA? When one want to use OpenGL textures in CUDA kernel one of the things to do is to retrieve a CUDA array from registered image and mapped resource, in this case a texture. In driver API it is done by…
Dori
  • 675
  • 1
  • 7
  • 26
15
votes
3 answers

WebGL - wait for texture to load

How do I test if the WebGLTexture object is 'complete' ? Currently I get this message: [WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is…
Remi Arnaud
  • 465
  • 1
  • 4
  • 11
15
votes
2 answers

openGL invert textures orientation during pixel-transfer?

as we all know, openGL uses a pixel-data orientation that has 0/0 at left/bottom, whereas the rest of the world (including virtually all image formats) uses left/top. this has been a source of endless worries (at least for me) for years, and i still…
umläute
  • 28,885
  • 9
  • 68
  • 122
15
votes
1 answer

How to use glDrawElements while keeping Texture Coordinates correct?

I'm using/targetting OpenGL 4.20, GSLSL 4.20, core. Using C. I'm exploring graphics with OpenGL and have decided to make a tile based game. I'm at the point where i'd like to actually draw a bunch of tiles, and am trying to use glDrawElements to…
Hydronium
  • 793
  • 1
  • 11
  • 28
15
votes
1 answer

Doing readback from Direct3D textures and surfaces

I need to figure out how to get the data from D3D textures and surfaces back to system memory. What's the fastest way to do such things and how? Also if I only need one subrect, how can one read back only that portion without having to read back…
Baxissimo
  • 2,629
  • 2
  • 25
  • 23
14
votes
1 answer

Constant Memory vs Texture Memory vs Global Memory in CUDA

I am trying to find the differences between constant memory vs texture memory vs global memory in CUDA. I am able to find the following relevant articles, but not able to find the answer to my question global vs shared memory in CUDA Usage of…
c_prog_90
  • 951
  • 20
  • 43
14
votes
2 answers

How to fill each side of a cube with different textures on OpenGL ES 1.1?

Please, I need tutorials/code examples of how to fill each side of a cube with different textures on OpenGL ES 1.1 I found a lot of tutorials but none of them explain clearly how to put different textures in each face and none of them gives easy…
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
14
votes
3 answers

How to match texture similarity in images?

What are the ways in which to quantify the texture of a portion of an image? I'm trying to detect areas that are similar in texture in an image, sort of a measure of "how closely similar are they?" So the question is what information about the image…
AruniRC
  • 5,070
  • 7
  • 43
  • 73
14
votes
4 answers

Repeating a texture over a plane in SceneKit

I have a 32x32 .png image that I want to repeat over a SCNPlane. The code I've got (See below) results in the image being stretched to fit the size of the plane, rather than repeated. CODE: let planeGeo = SCNPlane(width: 15, height: 15) let…
krntz
  • 613
  • 1
  • 6
  • 11