texturing

Paleted textures with 8-bit alpha channel in OpenGL ES

Hello! 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 alpha in the palette, ie. the texture contains 8-bit indexes into a palette with 256 R...

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() { gl_FrontColor = gl_Color; gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = ftra...

How do I apply a colour transformation matrix to a texture in OpenGL

Basically, I've got a colour matrix defined as such: struct ColourXForm { float4 mul; float4 add; float4 Transform(float4 colour) { return float4( colour.x * mul.x + add.x, colour.y * mul.y + add.y, colour.z * mul.z + add.z, colour.w * mul.w + add.w); } } What I want to do is to...

Shadows via shadowmaps and other textures - how to combine? OpenGL

Good day. I draw a scene with shadows using shadow maps method (when we're rendering scene from light point of view to retrieve depth buffer, making shadow texture and projecting it on the scene, rendered from a camera point of view) As I use shadowmap texture, all other textured objects, of course, lose their texturing. But I really DO ...

OpenGL texture loading issue

This is a very vague problem, so please feel free to clarify anything about this project. I'm working on a very large application, and recently a very perplexing bug has cropped up regarding the texturing. Some of the textures that we are loading are being loaded - I've stepped through the code, and it runs - but all OpenGL renders for ...

Texture size when using JOGL

In my next project, I'm trying to learn JOGL. The result should be a simple 2d animation. I've heard, that a texture must be 2^n*2^n in size. Can I still use images which don't have this size, or do I have to edit all images in advance? What do I have to take care of, when using such textures? As an example, I want to show a kind of pr...

Open GL ES Texture image quality

Hello, I have been having a bit of trouble with this issue with a while and have decided to ask for help! I have a textured 1024 x 1024 area in my iphone application. I am texturing it using an image that i converted to .pvr4 format using Apples texturetool. Now the user has the option of zooming in on this textured object.... The ...