ratalaika / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

OpenGL Extensions and GL_CLAMP_TO_EDGE #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reproduction:
1. Make two tiles of equal sizes with different textures 
2. Put them directly next to each other (form a metatile from two subtiles)
3. Notice a line appearing between them due to use of GL_CLAMP

Expected behavior is almost certainly to be the behavior that happens with 
usage of GL_CLAMP_TO_EDGE; GL_CLAMP is, in fact, completely removed from newer 
versions of OpenGL, and is well regarded as the Wrong Thing (tm) to use.

I understand that GL_CLAMP_TO_EDGE is an "extension" on Windows, but the file 
needed to enable this extension is easy to find, and basically essential for a 
lot of the common "extensions" that have become standard in the last decade or 
so since windows OpenGL was updated.

It is in my humble opinion that these two files should be part of the core 
Angel includes, through the Common.h file, and that GL_CLAMP should be aliased 
to GL_CLAMP_TO_EDGE, due to Angel being primarily for learning and easy of 
learning/use, and GL_CLAMP_TO_EDGE almost always being the correct decision:

http://www.opengl.org/registry/api/GL/glext.h
http://www.opengl.org/registry/api/GL/wglext.h

The fact that this engine, which lends itself quite well to tile based design, 
would include as default something that so utter destroys any hope of 
successfully using tiles that merge correctly is quite strange to me; it's 
clear GL_CLAMP_TO_EDGE is what a novice would assume would happen, and the LUA 
interface for levels has no way to specify that textures should be loaded any 
way besides GL_CLAMP, which is a very big "gotcha".

Thanks!

Original issue reported on code.google.com by LoveOver...@gmail.com on 18 Sep 2013 at 12:36

GoogleCodeExporter commented 9 years ago
Smart change -- will roll this in next time the texture system is upgrade. 

Original comment by lieseg...@gmail.com on 28 Sep 2013 at 6:10

GoogleCodeExporter commented 9 years ago
Angel4 removes use of GL_CLAMP

Original comment by lieseg...@gmail.com on 7 Feb 2014 at 8:37