Questions tagged [texturing]

119 questions
8
votes
2 answers

OpenGL mapping texture to sphere

I have OpenGL program that I want to texture sphere with bitmap of earth. I prepared mesh in Blender and exported it to OBJ file. Program loads appropriate mesh data (vertices, uv and normals) and bitmap properly- I have checked it texturing cube…
CppMonster
  • 1,216
  • 4
  • 18
  • 35
6
votes
2 answers

OpenGL, Shader Model 3.3 Texturing: Black Textures?

I've been banging my head against this for hours now, I'm sure it's something simple, but I just can't get a result. I've had to edit this code down a bit because I've built a little library to encapsulate the OpenGL calls, but the following is an…
Liam M
  • 5,306
  • 4
  • 39
  • 55
6
votes
3 answers

labels in an opengl map application

Short Version How can I draw short text labels in an OpenGL mapping application without having to manually recompute coordinates as the user zooms in and out? Long Version I have an OpenGL-based mapping application where I need to be able to draw…
M Katz
  • 5,098
  • 3
  • 44
  • 66
5
votes
1 answer

OpenGL, GL_MODULATE and Multitexturing

I have successfully drawn a multi-textured polygon but unfortunately only the first pixel of the overlaying texture is being used across the entire texture area. Here are the textures (GL_TEXTURE0 and GL_TEXTURE1): The result is this: Only the…
Aram Kocharyan
  • 20,165
  • 11
  • 81
  • 96
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
3 answers

OpenGL - Different textures on different surfaces of the same object

I'm trying to draw a car for a game I'm making using OpenGL. The car object is stored in an .obj file with an accompanying .mtl file. The car has 500+ vertices, 100+ faces and needs over 50 different textures applied to them, using my own vertex and…
DevGoldm
  • 828
  • 12
  • 28
4
votes
2 answers

GLSL: enabling/disabling texturing + shaders

I'm looking for a way to access OpenGL states from a shader. The GLSL Quick Reference Guide, an awesome resource, couldn't really help me out on this one. In the example I'm working on I have the two following shaders: Vertex: void main() { …
zyndor
  • 1,418
  • 3
  • 20
  • 36
4
votes
3 answers

OpenGL texturing

Sorry for the plea for help, but I am frustrated. I don't know why, but I've never seemed to be able to get texturing to work in OpenGL. I would really appreciate a minimal example, so long as it only uses /gl.h /glu.h and standard C++ libraries.…
Alexander Rafferty
  • 6,134
  • 4
  • 33
  • 55
4
votes
1 answer

Binding a zero texture in OpenGL

In my program I use 2 textures: t0 and t1. t1 is additional, needed only in some cases: ..... glActiveTexture ( GL_TEXTURE1 ); if ( mDisplayMode == EDM_DEFAULT ){ glBindTexture( GL_TEXTURE_2D, 0 ); // In this case I don't need t1 }else{ …
Jeka
  • 1,364
  • 17
  • 33
3
votes
2 answers

What happens when I have a uint32 (R32) texture and I sample/fetch from it in a shader?

Note: I distinguish sample from fetch in the title, since in my tests this behavior seems to differ between the two. Possible answers: The [0..2^32] range is scaled down to [0..1] (I think OpenGL works this way) The uint32s are casted to float32s…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
3
votes
1 answer

Texturing a sphere in OpenGL with glTexGen

I want to get an earth texture on sphere. My sphere is an icosphere built with many triangles (100+) and I found it confusing to set the UV coordinates for whole sphere. I tried to use glTexGen and effects are quite close but I got my texture…
KamCho
  • 131
  • 2
  • 10
3
votes
3 answers

How do I efficiently map a high-res SKScene in SceneKit?

Possibly related: Optimizing SceneKit performance with high-res textures I am mapping a SKScene onto a board geometry to create a board game. The scene needs to be relatively large (2048x1024) so that I can zoom in on the action and still have…
Double M
  • 1,449
  • 1
  • 12
  • 29
3
votes
1 answer

Unity: Texturing a Shoreline in a Hexgrid

I'm a beginner programmer and new to Unity. I'm currently practicing hexgrid building with Unity5. My current hexgrid consists of flat hexes, which have either a grassland or ocean 2D texture. (Current hexgrid) I'd like to have a sandy shoreline in…
EpicCheese
  • 35
  • 4
3
votes
0 answers

Apply fxaa to scene but except some textures

I have some scene in three.js with static objects like solid cubes and so on. Over this objects I have place some quads each of them is textured with letter image. When I activate fxaa postprocessing main objects looks fine but letters textures…
3
votes
0 answers

How do you upload texture data to a Sparse Texture using TexSubImage in OpenGL?

I am following apitest on github, and am seeing some very strange behavior in my renderer. It seems like the Virtual Pages are not receiving the correct image data. Original Image is 500x311: When i render this image using a Sparse Texture, i must…
Joe
  • 454
  • 1
  • 6
  • 20
1
2 3 4 5 6 7 8