Original Post
I have some questions for you guys, if you dare to help me with this... these things have been bothering me for a long time, so i appreciate your help a lot. Here we go: 1) I readed this somewhere: "Make sure that you specify a texture coordinate before each vertex that makes up a face. If you have 3 verticies the pattern for texture mapping the triangle would go like this: TexCoord; VertexCoord; TexCoord; VertexCoord; TexCoord; VertexCoord; " Why i need to do that? I have sometimes used: "TexCoord; VertexCoord; VertexCoord; VertexCoord; VertexCoord; " and its working fine. 2) Do i really need to bind a texture even when i just need a plain color without any patterns in it, for example white text? feels stupid to bind texture for such simple things like that... 3) Is there a way to give texture coordinates in pixels? I cant make proper tilemaps by using float values as texture coordinates: sometimes it shows the near pixels of some other tiles when zoomed out (even when the filter is GL_NEAREST). I think it would fix every problems related to tile maps if the texture coordinates were given as pixels. 4) Would it be better to store the game textures in small squares, or as big squares as possible? or does it even matter as long as there arent million of different texture images? small would be something like 256x256 and big 2048x2048 etc. I heave heard that the texture binding procedure is one of the slowest functions you can use, which why im pondering this. 5) Whats the correct way to draw on the game screen, like health bars etc? How should it be done properly? i have problems to find the screen edges to position the quads there with their textures while i need to use the Z position in 3d rendering. 6) any tips? how should i draw tons of different tiles (3d game) when the tile images are in many different texture images, and without raping the texture bind command? Should I just draw those tiles first which are in the same texture image and then continue to another texture image for other tiles? 7) How i can draw GL_LINEAR filtered tilemaps properly without mixing the tile images to neighbour tiles? I heard something about using GL_CLAMP but it didnt make it different. 8) Why the hell are the texture coordinates upside down? Y-coordinate zero point is at bottom, when it should be at top... 9) Is there a good way to draw 256 colour paletted textures? or do i need to convert my paletted texture data into 32bit colors, and when i want to make some texture into different palet, i just redraw it and create new texture for it? 10) when i make 100% transparent pixel near some 0% transparent pixel, how do i prevent that the 0% pixel doesnt fade the color to the 100% transparent pixel color when using GL_LINEAR filter? Do i just need to set that 100% transparent pixel into the same color as the 0% pixel color was? i dont want to use any masking textures, just one quad which uses alpha blending. I hope someone understood my questions, or even just one question right. My english isnt so good... -- Best regards - Emark