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

iPhone: How much OpenGL cleanup do I need to do when a context goes away?

I several views in an iPhone app which happen to use independent openGL contexts. They are not necessarily long-lived so they go away before the process does. And they have a couple textures in each. Does -releaseing the EAGLContext cause all that…
Ben Zotto
  • 70,108
  • 23
  • 141
  • 204
2
votes
0 answers

Texture filtering modes for integer textures

why filtering modes including trilinear, bilinear filtering is not allowed for integer textures? Why mipmapping is also not allowed?
debonair
  • 2,505
  • 4
  • 33
  • 73
2
votes
1 answer

Recolouring SDL2 textures

So I have a sprite image and a mask sprite: (the mask is actually a paletted image, where each value is a different recolour area, 0 being the blue that isn't recoloured) These areas would be recoloured into any arbitrary colour. What's the best…
LordAro
  • 1,269
  • 3
  • 18
  • 35
2
votes
0 answers

Three.js skew or deform Texture on a face

i want to make a panoramic viewer for a specific image format. A hole panoramic image consists of 8 by 4 images. my Idea was to make a Sphere with geometry = new THREE.SphereGeometry( 500,8, 4 ); and Texture each face with…
user2304379
  • 59
  • 1
  • 8
2
votes
2 answers

Using OpenGL GL.TexSubImage2D for NPOT Textures results in artifacts

I'm using OpenGL through OpenTK in C# and try to load textures from generic bitmaps. My driver does not support NPOT Textures so what I do is allocate a POT Texture with GL.TexImage2D and fill it with my bitmap through GL.TexSubImage2D. However I…
Flamefire
  • 5,313
  • 3
  • 35
  • 70
2
votes
0 answers

Large memory footprint with OpenGL cubemap

I have a skybox composed of 6 texture of 1024x1024. The cubemap works correctly but CodeXL tells me that the cubemap texture takes 110MB. It finds no OpenGL errors. This is my code of the cubemap generation: static const char* names[] = {…
Koukan
  • 21
  • 3
2
votes
1 answer

Issue in rendering multiple textures on multiple objects

I am trying to render two objects - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect method and there I am trying to bind separate textures for both the objects. For first object following is the texture binding code /************* texture…
MPG
  • 251
  • 1
  • 13
2
votes
0 answers

Strange GLSL/Opengl Bug: Multiple sampler

I have a very strange bug. I use multiple textures in a GLSL fragment shader, but I cannot read texture 1 if texture 0 is not set. WORKS: glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D,…
Marc477
  • 161
  • 2
  • 7
2
votes
1 answer

D3D9 multithread creating textures/vertex buffers

I'd like to have in my game second thread which would load/unload textures. Can I load textures in 2nd thread using the same d3d9 device which was created on main thread? Creating textures from file will take more time than 1 frame so I may need to…
ElChupacabra
  • 1,045
  • 10
  • 18
2
votes
0 answers

Using Textures with compute and fragment shaders

I'm trying to use a texture to store some data to pass between the compute shader where the data is calculated to the fragment shader where it is used. I create the texture and fill it with empty values using: GLuint texID; glGenTextures(1,…
DomAyre
  • 828
  • 1
  • 11
  • 23
2
votes
1 answer

Boolean texture

I need an efficient way of fetching booleans from a texture with openGL. The boolean array will be a huge 3D array, I can't afford wasted space, meaning I can't afford to encode booleans into 1 byte each. Right now my solution is to encode it into…
Thomas
  • 6,032
  • 6
  • 41
  • 79
2
votes
1 answer

What is texture memory, allocated with OpenGL, limited by?

I'm making a 2D game with OpenGL. Something I'm concerned with is texture memory consumption. 2D games use a few orders of magnitude more texture memory than 3D games, most of that coming from animation frames and backgrounds. Obviously there's…
Anne Quinn
  • 12,609
  • 8
  • 54
  • 101
2
votes
1 answer

How to dynamically create texture from set of widgets in Kivy?

I have a square layout with many sets of widgets. Set of widget presents empty widget with colorful background (I draw it with primitives) and one or more labels over it, so set is 2 or more widget. I animate each set independently (like 2048-game,…
Necronomicron
  • 1,150
  • 4
  • 24
  • 47
2
votes
1 answer

CUDA texture interpolation incorrect for normalized co-ordinates

I am trying to use CUDA texture interpolation on a lookup table of floats. When normalized co-ordinates are used the results are incorrect; when non-normalized co-ordinates are used, they are correct. Why is this? Compilable example: #include…
Sam
  • 557
  • 6
  • 20
2
votes
2 answers

OpenGL 2D Texture Mapping problem

I am relatively new to OpenGL and I am having some issues when I am rendering an image as a texture for a QUAD which is as the same size of the image. Here is my code. I would be very grateful if someone helps me to solve this problem. The image…
rwb
  • 621
  • 1
  • 12
  • 21