textures

Using OpenGL textures larger than window/display size

I'm having problems using textures that are larger than the OpenGL window or the display size as non-display render targets. What's the solution for this problem? ...

OpenGL: texture and plain color respond differently to ambient light?

This is a rather old problem I've had with an OpenGL application. I have a rather complex model, some polygons in it are untextured and colored using a plain color with glColor() and others are textured. Some of the texture is the same color as the untextured polygons and there should be no visible seam between the two. The problem is ...

How to generate one texture from N textures?

Let's say I have N pictures of an object, taken from N know positions. I also have the 3D geometry of the object, and I know all the characteristics of both the camera and the lens. I want to generate a unique giant picture from the N pictures I have, so that it can be mapped/projected onto the object surface. Does anybody knows where ...

At what point do MaxTextureRepeat limitations come into play?

When executing a pixel shader under Direct3D, do the limits on texture coordinates imposed by MaxTextureRepeat only become an issue during calls to texture lookup functions such as Tex2D(), or do they come into play anytime the texture coordinates are accessed within the shader? I wish to know whether it's possible to avoid the MaxTextu...

Textured spheres without strong distortion

I've seen well-textured balls, planets, and other spherical objects in couple of games, last time in UFO: aftermath. If you just splatter a texture into latitude/longditude as u and w -coordinates you'll get lots of ugly texture distortion to poles. I can think myself an one way to implement a spherical map with minimum distortion. By m...

OpenGL textures with multiple display contexts

I have an undefined number of display context and each will display a texture. When I call glGenTextures I get the same name returned across all display contexts. Will this work? Even though they have the same name will they still store and display different textures? If not what should do to get around this? ...

Color mapping a texture in opengl

I am displaying a texture that I want to manipulate without out affecting the image data. I want to be able to clamp the texel values so that anything below the lower value becomes 0, anything above the upper value becomes 0, and anything between is linearly mapped from 0 to 1. Originally, to display my image I was using glDrawPixels. ...

Display arbitrary size 2d image in opengl

I need to display 2d images in opengl using textures. The image dimensions are not necessarily powers of 2. I thought of creating a larger texture and restricting the display to the part I was using but the image data will be shared with openCV so I don't want to copy data a pixel at a time into a larger texture. EDIT - it turns out tha...

How to apply texture to glutSolidCube

Hi, I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube). I am doing something like: glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); glT...

OpenGL and monochrome texture

Is it possible to pump monochrome (graphical data with 1 bit image depth) texture into OpenGL? I'm currently using this: glTexImage2D( GL_TEXTURE_2D, 0, 1, game->width, game->height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, game->culture[game->phase] ); I'm pumping it with square array of 8 bit unsigned integers in GL_LUMINANCE mode (one 8...

[OpenGl] Loading new texture into already defined texture name

I have an OpenGl program in which I am displaying an image using textures. I want to be able to load a new image to be displayed. In my Init function I call: Gl.glGenTextures(1, mTextures); Since only one image will be displayed at time, I am using the same texture name for each image. Each time a new image is loaded I call the fo...

How to apply a dds texture to BoxShape entity in MS Robotics Studio?

I create a new BoxShape() object in Robotics Studio and I want to apply a cube-map dds texture to this box. What is the way do it? ...

What is the preferred way to show large images in OpenGL

I've had this problem a couple of times. Let's say I want to display a splash-screen or something in an OpenGL context (or DirectX for that matter, it's more of a conceptual thing), now, I could either just load a 2048x2048 texture and hope that the graphics card will cope with it (most will nowadays I suppose), but growing with old-scho...

opengl topdown<->bottomup textures?

When i load an image via FreeImage, the bits are bottom to top. My GL code expects all images to be topdown. Whats the best way to flip the image when i copy the bits to the texture? ...

OpenGl 16 bit display via Tao/C#

Hi all, I have some scientific image data that's coming out of a detector device in a 16 bit range which then gets rendered in an image. In order to display this data, I'm using OpenGL, because it should support ushorts as part of the library. I've managed to get this data into textures rendering on an OpenGL 1.4 platform, a limitatio...

Best way to copy a PNG into a bigger blank/code generated texture? (OpenGL ES 1.1/iPhone)

I have a 320x480 PNG that I would like to texture map/manipulate on the iPhone but these dimensions are obviously not power of 2. I already tested my texture map manipulation algorithm on a 512x512 PNG that is a black background with a 320x480 image superimposed on it, centered at the origin (lower left corner (0,0)) where the 320x480 a...

Best image format for uncompressed textures?

I am in the process of selecting an image format that will be used as the storage format for all in-house textures. The format will be used as a source format from which compressed textures for different platforms and configurations will be generated, and so needs to cover all possible texture types (2D, cube, volymetric, varying number ...

DDS texture loading

How would I load a dds texture file into an OpenGL 2dtexture or cube map texture? ...

Is there a way to split one texture into an array of them using SOIL in C++?

I'm using SOIL in my project, and I need to take in a single texture, and than convert it into an array of textures using different parts of the first texture. (To use a sprite sheet). I'm using SDL and OpenGL by the way. ...

OpenGL: texture feedback?

I've have a rendering setup in which I write to a Frame Buffer object attached to a texture and the rendering itself also uses the texture I'm rendering to. Is this generally a good idea? Could there be some strange issues involved here I'm perhaps not aware of? ...