Init texture with zeroes. Should fix the red border with pixel_buffer and nvidia cards on Mac OS X and Linux.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4228
This commit is contained in:
parent
5888c05dd1
commit
ee236a7e5a
1 changed files with 4 additions and 1 deletions
|
@ -728,7 +728,10 @@ dosurface:
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
}
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texsize, texsize, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, 0);
|
||||
Bit8u* emptytex = new Bit8u[texsize * texsize * 4];
|
||||
memset((void*) emptytex, 0, texsize * texsize * 4);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texsize, texsize, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, (const GLvoid*)emptytex);
|
||||
delete [] emptytex;
|
||||
|
||||
glClearColor (0.0, 0.0, 0.0, 1.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue