Tagged Questions
16
votes
4answers
4k views
How to avoid texture bleeding in a texture atlas?
In my game there is a Minecraft-like terrain made out of cubes. I generate a vertex buffer from the voxel data and use a texture atlas for looks of different blocks:
The problem is that the texture ...
10
votes
1answer
3k views
How does UVW texture mapping work?
I'm trying to understand the mathematical theory behind UVW mapping. Can anyone explain me how UVW mapping works? Or at least provide me a pointer?
24
votes
4answers
9k views
why would you use textures that are not a power of 2?
In the early days of OpenGL and DirectX, it was required that textures were powers of two. This meant that interpolation of float values could be done very quickly using shifting and such.
Since ...
18
votes
6answers
3k views
Creating a retro-style palette swapping effect in OpenGL
I'm working on a Megaman-like game where I need to change the color of certain pixels at runtime. For reference: in Megaman when you change your selected weapon then main character's palette changes ...
1
vote
1answer
162 views
SDL_Image and typical SDL BMP loading fails completely
been messing with OpenGL and SDL for a pair of weeks.
The thing is quite weird. I have been loading a texture from a BMP and using a really easy shader to make it work, and so far it has worked very ...
0
votes
2answers
2k views
Map and fill texture using PBO (OpenGL 3.3)
I'm learning OpenGL 3.3 trying to do the following (as it is done in D3D)...
Create Texture of Width, Height, Pixel Format
Map texture memory
Loop write pixels
Unmap texture memory
Set Texture
...