mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
OGL: use GL_TEXTURE* constants
This commit is contained in:
@ -58,7 +58,7 @@ bool SaveTexture(const std::string& filename, u32 textarget, u32 tex, int virtua
|
||||
int width = std::max(virtual_width >> level, 1);
|
||||
int height = std::max(virtual_height >> level, 1);
|
||||
std::vector<u8> data(width * height * 4);
|
||||
glActiveTexture(GL_TEXTURE0+9);
|
||||
glActiveTexture(GL_TEXTURE9);
|
||||
glBindTexture(textarget, tex);
|
||||
glGetTexImage(textarget, level, GL_RGBA, GL_UNSIGNED_BYTE, data.data());
|
||||
glBindTexture(textarget, 0);
|
||||
@ -117,7 +117,7 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(const TCacheEntryConf
|
||||
{
|
||||
TCacheEntry* entry = new TCacheEntry(config);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0+9);
|
||||
glActiveTexture(GL_TEXTURE9);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, entry->texture);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, config.levels - 1);
|
||||
@ -146,7 +146,7 @@ void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height,
|
||||
PanicAlert("size of level %d must be %dx%d, but %dx%d requested",
|
||||
level, std::max(1u, config.width >> level), std::max(1u, config.height >> level), width, height);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0+9);
|
||||
glActiveTexture(GL_TEXTURE9);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, texture);
|
||||
|
||||
if (expanded_width != width)
|
||||
@ -176,7 +176,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
|
||||
|
||||
OpenGL_BindAttributelessVAO();
|
||||
|
||||
glActiveTexture(GL_TEXTURE0+9);
|
||||
glActiveTexture(GL_TEXTURE9);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, read_texture);
|
||||
|
||||
glViewport(0, 0, config.width, config.height);
|
||||
@ -487,7 +487,7 @@ void TextureCache::ConvertTexture(TCacheEntryBase* _entry, TCacheEntryBase* _unc
|
||||
TCacheEntry* entry = (TCacheEntry*) _entry;
|
||||
TCacheEntry* unconverted = (TCacheEntry*) _unconverted;
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + 9);
|
||||
glActiveTexture(GL_TEXTURE9);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, unconverted->texture);
|
||||
|
||||
FramebufferManager::SetFramebuffer(entry->framebuffer);
|
||||
@ -502,7 +502,7 @@ void TextureCache::ConvertTexture(TCacheEntryBase* _entry, TCacheEntryBase* _unc
|
||||
glUniform1f(s_palette_multiplier_uniform[format], unconverted->format == 0 ? 15.0f : 255.0f);
|
||||
glUniform4f(s_palette_copy_position_uniform[format], 0.0f, 0.0f, (float)unconverted->config.width, (float)unconverted->config.height);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + 10);
|
||||
glActiveTexture(GL_TEXTURE10);
|
||||
glBindTexture(GL_TEXTURE_BUFFER, s_palette_resolv_texture);
|
||||
|
||||
OpenGL_BindAttributelessVAO();
|
||||
|
Reference in New Issue
Block a user