Questions tagged [texturing]

119 questions
1
vote
1 answer

Texture the 3D figure (cylinder)

I need to texture my cylinder, I have texture.png and i already did a polygonal mesh (with triangles). Here is the code if you need pastebin import pyglet import pyglet.gl as pgl from pyglet.window import key import math win =…
1
vote
2 answers

Blender adding image / texture on object does not show up in .obj document

I've watched some tutorials on how to add images to an object in blender. There are different ways to do it but I choose to do it as the following: with UV image editor and making a material and after that a texture for the image. This is how it…
Distortion
  • 309
  • 2
  • 3
  • 12
1
vote
1 answer

Issue using glTexCoordPointer()

I'm fairly new to OpenGL (and GLSL) and I have an issue using glTexCoordPointer(). I have the texture loaded in and it is rendering on the object correctly (a single quad) but I also get another quad appearing which is a single colour not a part of…
BodneyC
  • 110
  • 1
  • 11
1
vote
1 answer

Flatten 3D object to create a template for a 2D texture map

I would like to create a texture map for a 3D car model I have. I am not sure where to start. I thought maybe I could unwrap the 3D object to a 2D image and then use this as an outline to draw my texture. Is this possible, or is there a simpler…
Razor Robotics
  • 183
  • 1
  • 9
1
vote
3 answers

Paletted textures with 8-bit alpha channel in OpenGL ES

Can I get paletted textures with RGB palette and 8-bit alpha channel in OpenGL ES? (I am targetting the iPhone OpenGL ES implementation.) After peeking into the OpenGL documentation it seems to me that there is support for paletted textures with…
zoul
  • 102,279
  • 44
  • 260
  • 354
1
vote
0 answers

OpenGL background object textures seen in foreground

I am struggling to correctly display my objects in OpenGL. The problem is that the background texture is displayed on top of the foreground texture. (as seen in the picture with the leaves) I am using OpenGL 4.1 Core on os x el capitan. My shader…
Valvy
  • 42
  • 1
  • 6
1
vote
0 answers

OpenGL 4.3 - CubeMap only works when bound as a GL_TEXTURE_2D

I am trying to implement a skybox in open gl. It doesn't work unless I bind It as GL_TEXTURE_2D This is how I load my cube map: // http://www.antongerdelan.net/opengl/cubemaps.html void SkyBoxMaterial::CreateCubeMap(const char* front, const char*…
Marc HPunkt
  • 439
  • 3
  • 14
1
vote
1 answer

Unable to render a texture on a quad

I am trying to program a simple game in C++ using OpenGL for graphics. In my game, I have objects that are rendered onscreen as a white square. I would like to be able to bind an image as a texture to these objects, so that I can render an image…
tomdunkle0
  • 21
  • 3
1
vote
2 answers

How do I draw a cube with all faces having different textures?

I'm trying to move my code over to modern Opengl, but am having trouble. Right now my code will draw a cube and it will put a texture on, but it will only attach the first texture to all of my face. I am also using SOIL to load my textures into my…
WhyYouNoWork
  • 273
  • 5
  • 18
1
vote
1 answer

WebGL Multitexturing with Video

I'm trying to use two textures in a fragment shader and having trouble getting WebGL to send the textures properly. I can send one at a time, but when I try to do both at once, I just get black. I've seen some other multitexturing examples around,…
aferriss
  • 914
  • 9
  • 20
1
vote
1 answer

DirectX 11 Per Face Data

My question is simple in theory - what is the best way to input per face data to a pixel shader? If it were injected via a simple cbuffer array, I could access the data using the SV_PrimitiveID value. The limit of 8096 floats per cbuffer would…
Mrfence
  • 350
  • 2
  • 12
1
vote
1 answer

How can I efficiently texture multiple sprites?

I am trying to implement sprites in DX11, but I don't know how to proceed with texturing them. First off, there might be multiple sprites, each using a different texture(atlas). But since I don't know how many sprites are on-screen, I can't use…
Zak Laberg
  • 27
  • 4
1
vote
1 answer

Texturing a Sphere C#

I currently work on a panoramic viewer based on Managed DX and C#. I created a sphere mesh and now i want to texture it with an Earth map. I load the texture in a Texture object but when I look at the result, the texture repeats in longitude and…
user3252833
  • 129
  • 9
1
vote
2 answers

Opengl ES 2.0 - Load PNG with GLKit instead of OpenGL API

I have a piece of code that loads a textures using glTexImage2D like this: // to test texturing CGImageRef imageRef = [[UIImage imageNamed:@"Blob.png"] CGImage]; int width = CGImageGetWidth(imageRef); int height =…
rraallvv
  • 2,875
  • 6
  • 30
  • 67
1
vote
1 answer

Artefacts in texturing in PyOpenGL

I have used the Python Imaging Library to load a .ttf font. Here is the code: self.rect = Image.new("RGBA", (600,100), (255,255,255)) self.draw = ImageDraw.Draw(self.rect) self.font = ImageFont.truetype("font.ttf", 96) self.draw.text((5,0),…
psiyumm
  • 6,437
  • 3
  • 29
  • 50