EMI: Add support for clamping sprite textures and repeating other textures.
This commit is contained in:
parent
29ddd3b3e9
commit
df3d63fc24
18 changed files with 40 additions and 28 deletions
|
@ -873,7 +873,7 @@ void GfxOpenGLS::turnOffLight(int lightId) {
|
|||
}
|
||||
|
||||
|
||||
void GfxOpenGLS::createMaterial(Texture *material, const char *data, const CMap *cmap) {
|
||||
void GfxOpenGLS::createMaterial(Texture *material, const char *data, const CMap *cmap, bool clamp) {
|
||||
material->_texture = new GLuint[1];
|
||||
glGenTextures(1, (GLuint *)material->_texture);
|
||||
char *texdata = new char[material->_width * material->_height * 4];
|
||||
|
@ -927,7 +927,7 @@ void GfxOpenGLS::createMaterial(Texture *material, const char *data, const CMap
|
|||
glBindTexture(GL_TEXTURE_2D, textures[0]);
|
||||
|
||||
//Remove darkened lines in EMI intro
|
||||
if (g_grim->getGameType() == GType_MONKEY4) {
|
||||
if (g_grim->getGameType() == GType_MONKEY4 && clamp) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue