Questions tagged [texture-mapping]

Texture mapping is a method for adding detail, surface texture (a bitmap or raster image), or color to a computer-generated graphic or 3D model.

971 questions
6
votes
1 answer

pixel perfect texture mapping with modern OpenGL

After deciding to try programming in modern OpenGL, I've left behind the fixed function pipeline and I'm not entirely sure about getting the same functionality I had before. I'm trying to texture map quads with pixel perfect size, matching the…
Lefty
  • 69
  • 1
  • 3
6
votes
1 answer

Failing to map a simple unsigned byte rgb texture to a quad:

I have a very simple program that maps a dummy red texture to a quad. Here is the texture definition in C++: struct DummyRGB8Texture2d { uint8_t data[3*4]; int width; int height; }; DummyRGB8Texture2d myTexture { { …
Elad Maimoni
  • 3,703
  • 3
  • 20
  • 37
6
votes
2 answers

mapping a texture on a square: Why is the image rotated?

I successfully mapped an image on a square in OpenGL ES...but its rotated 90 degrees. Im pretty new at OpenGL ES, and was wondering if someone could point out why exactly its rotated. Thanks! package se.jayway.opengl.tutorial; import…
jfisk
  • 6,125
  • 20
  • 77
  • 113
6
votes
1 answer

Three.js repeat texture with THREE.TextureLoader

I would like to ask you if you know how to repeat texture using THREE.TextureLoader(). I've found solutions just for using THREE.ImageUtils.loadTexture(). Here is part of my code: var loader = new THREE.TextureLoader(); var…
xmigas
  • 131
  • 6
  • 19
6
votes
0 answers

Map a texture onto a model in Python

To frame this question: I am a complete beginner in terms of 3d rendering, and I would like to get my feet wet. My goal is to create a command-line script (ideally in Python) which takes some kind of 3d model file (e.g. a sphere), maps a texture…
Mala
  • 14,178
  • 25
  • 88
  • 119
6
votes
2 answers

Most Efficient way of Multi-Texturing - iOS, OpenGL ES2, optimization

I'm trying to find the most efficient way of handling multi-texturing in OpenGL ES2 on iOS. By 'efficient' I mean the fastest rendering even on older iOS devices (iPhone 4 and up) - but also balancing convenience. I've considered (and tried) several…
badweasel
  • 2,349
  • 1
  • 19
  • 31
6
votes
1 answer

Correct Way to Texture Square Made of Two Triangles?

I using OpenGL 4.1 and GLSL 410. I am attempting to texture a square that I made using the following coordinates: float points[] = { -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; I draw the square…
foobar5512
  • 2,470
  • 5
  • 36
  • 52
6
votes
2 answers

D3D11: Creating a cube map from 6 images

How do I create a cube map in D3D11 from 6 images? All the examples I've found use only one .dds. Specifically, how do I upload individual faces of the cube texture?
SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87
6
votes
1 answer

Cube mapping in OpenGL

I try to map cube with 6 bitmaps to achieve skybox effect. My problem is fact that one texture is mapping to every face of cube. I've checked in gDEBugger, in cube texture memory I have only one image (as I try to load six images). Code preparing…
CppMonster
  • 1,216
  • 4
  • 18
  • 35
6
votes
2 answers

Three JS Map Material causes WebGL Warning

I'm trying to define a material to meshes I loaded in from OBJLoader through the following wrapper function: function applyTexture(src){ var texture = new THREE.Texture(); var loader = new THREE.ImageLoader(); loader.addEventListener(…
JayMoretti
  • 255
  • 1
  • 3
  • 11
5
votes
1 answer

How is texture data accessed on the GPU in OpenGL?

I don't fully understand the way texture data is accessed on the GPU. If possible - could anyone explain these? When the number of texture units is limited, does this limit the number of textures I can generate using glGenTextures() and upload to…
5
votes
1 answer

Canvas fast texture mapping

I'm making a top-down game with simple 3d graphics. (I'd be happy if it were like gta 2.) I've implemented affine texture mapping that I have found here but it is too CPU intensive. So my question is: Is there a better solution? I don't understand…
Kuka
  • 135
  • 1
  • 8
5
votes
1 answer

How much more efficient are power-of-two textures?

I am creating an OpenGL video player using Ffmpeg and all my videos aren't power of 2 (as they are normal video resolutions). It runs at fine fps with my nvidia card but I've found that it won't run on older ATI cards because they don't support…
Infiniti Fizz
  • 1,726
  • 4
  • 24
  • 40
5
votes
1 answer

How do I interpolate the UV co-ordinates?

I'm trying to apply texture to my .md2 model. I used the Gouraud shading to color it (the standard algorithm with bottom/top flat triangle) and I have to use a similar code for texture co-ordinates U and V. But I don't really understand how to…
Monica Hotea
  • 93
  • 1
  • 1
  • 5
5
votes
1 answer

Using Texture Atlas as Texture Array in OpenGL

I'm now building a Voxel game. In the beginning, I use a texture atlas that stores all voxel textures and it works fine. After that, I decided to use Greedy Meshing in my game, thus texture atlas is not useful anymore. I read some articles which…
QDinh
  • 404
  • 4
  • 7
1 2
3
64 65