texture

Example models with texture coordinates?

I'm writing a small OpenGL demo and I would really like to show some example models with textures. The trouble is I have a really tough time finding such models. There are tons of repositories of 3D models in various formats but it seems that only a small fraction of them have texture coordinates. I'm looking for find some well known st...

Passing D3DFMT_UNKNOWN into IDirect3DDevice9::CreateTexture()

I'm kind of wondering about this, if you create a texture in memory in DirectX with the CreateTexture function: HRESULT CreateTexture( UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle ); ...and pass in D3DFMT_UNKNOWN format what is s...

OpenGLES texture disappears

Hi, I have a little trouble switching OpenGLES views(EAGLViews). When i add an subview to EAGLView, texture that is shown in the view dissapear. I don't know why. I'm using code from tutorials for loading textures. I have a view, there I'm displaying texture, then I add subview to this view by calling addSubview method. And then, when ...

iPhone OpenGL ES Texture2D Masking

What's the best choice when trying to mask a texture like ColorSplash or other apps like iSteam, etc? I started learning OPENGL ES like... 4 days ago (I'm a total rookie) and tried the following approach: 1) I created a colored texture2D, a grayscale version of the first texture and a third texture2D called mask 2) I also created a te...

Huge area texture?

This is a very general question that's not related to a specific language. I'm having this array of int's: int[100][100] map; This contains just tile numbers, and is rendered as 256x256 tiles. So it's basically just a tile map or whatever it should be called. Thing is I want to be able to write anything to the map, anywhere, and it sh...

OpenGL: distorted textures when not divisible by 2

I have a game engine that uses OpenGL for display. I coded a small menu for it, and then I noticed something odd after rendering the text. http://img43.imageshack.us/i/garbagen.png/ As you see, the font is somewhat unreadable, but the lower parts (like "Tests") look as intended. Seems the position on the screen affects readability, as t...

Which version of OpenGL supports rectangular textures (w/o extensions)?

Rectangular textures used to be support through extensions and at some version of OpenGL are now directly supported, i.e I can create textures with the same basic opengl methods just supplying non-power-of-two sizes. I've googled and can't seem to find a definitive changelog for the OpenGL spec. I need this information to dynamically de...

Draw polygon to clip texture to be transparent where polygon is openGL(EL)

I have two layers being drawn. A static background texture and a texture(png) with transparent parts. I can correctly see the background with no problems. What I would like to do is modify the top layer by drawing a polygon(rectangle) with size that will change at run time to make that portion of the top layer transparent so you just see...

Need to use D3DFMT_LIN_A8R8G8B8 instead of D3DFMT_A8R8G8B8 for textures to show correctly on Xbox 360 while this is undefined on the PC. LIN stands for Linear...

Hi All, In the Xbox 360 I found out that I have to use D3DFMT_LIN_[xxxxxxx] instead of just D3DFMT_[xxxxxxx] since the textures wouldn't work with D3DFMT_LIN on the 360. As the tite says the LIN part stands for Linear, the description between the D3DFMT_LIN and D3DFMT_ for the texutres is just that one format is linear one isn't. So wo...

Program crashes when releases UIImage after generating OpenGL ES texture

Right now, I have followed this tutorial: http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6%5F25.html It does not work if I tried to release UIImage: I will get a 'EXC_BAD_ACCESS'. Now, I made the UIImage to be instance variables and retain them. I do not make it autorelease. But the problem is sometimes I w...

Enabling transparency on a texture in O3D

I have a texture of a set of lungs and the heart that I am applying to a series of triangles. The texture is a .png file and has a transparent background but when I apply it in O3D it shows up with a white background. How would I get this to show up as transparent? ...

OpenGL Texture Combiner - gradient texture

Hi, I've got 2 RGBA8 textures: A) The "main" texture with data for display in all channels B) The "gradient" texture that only has meaningful data in alpha (of course this should really just be an A8 texture) Using OpenGLES 1.1 texture combiners, I'd like the resulting texel to copy RGB from texture #A, and use an alpha modulated from ...

Link to external texture file in self-contained XAML representing a 3D model.

I have a XAML file representing a 3D model with textures. I want to make the textures read from the same place the file is, or relative to it. I read the file using a XamlReader, so I want the file to be self-contained. I place the textures using an ImageBrush which ImageSource is a pack synatx URI. When I use a 'siteoforigin' syntax...

Texturing error on a Sphere

I have a number of spherical longitude/latitude coordinates for points on a sphere that I need to visualize. For that purpose, I transformed the points to cartesian coordinates and built a mesh of triangles that I can render with VTK. Works so far. Now I want to use a texture for the sphere model. Therefore I transformed the spherical c...

Algorithm for "filling in" texture in a 2D image

I recall seeing a paper a while back for an algorithm that could automatically and seamlessly "graft" texture from parts of an image onto another part of an image. The approach was something along the lines of the following: You'd build up a databases of small squares of pixels (perhaps 8X8) from the parts of the picture that are prese...

How do I set a pixel color in a texture using ManagedDX?

Hey guys, I need to set a specific pixel in a texture to a custom color, for doing that I made a Bitmap and I always set the pixel in the bitmap, then I recreate the texture from the bitmap. Doing that is very time consuming, is there any way to modify the pixel directly in the texture? ...

What does SetPrivateData does in Managed DirectX?

Iv'e seen this method for a Texture, would someone explain me what does it do? ...

How to programmatically alpha fade a textured object in OpenGL ES 1.1 (iPhone)

I've been using OpenGL ES 1.1 on the iPhone for 10 months, and in that time there is one seemingly simple task I have been unable to do: programmatically fade a textured object. To keep it simple: how can I alpha fade, under code control, a simple 2D triangle that has a texture (with alpha) applied to it. I would like to fade it in/out w...

32 pixel gap at top of opengl es texture

I am trying for the first time to render to a texture using openGL ES (for iPhone) and then display the texture on the screen. Everything works except that there is a 32 row gap at the top of the texture and the bottom 32 rows are cut off. It's like all of my drawing is being offset 32 pixels down, which results in the bottom 32 rows not...

Using opengl, how do I combine a background image and a smaller distorted texture?

I am attempting to make an image stretch effect on the iphone. I make a vertex array and shift the texture data for each indice within an arbitrary radius of a background image. Then make the following calls to display: int n = gridSize_.x * gridSize_.y; glEnableClientState( GL_VERTEX_ARRAY); glEnableClientState( GL_TEXTURE_COORD_ARRAY...