Only apply an AMD-specific hack when generating mipmaps on AMD GPUs

This commit is contained in:
Alex Szpakowski
2013-11-17 05:44:09 -04:00
parent 0214bab0fe
commit c0b28f9d07
3 changed files with 62 additions and 6 deletions
+20
View File
@@ -51,6 +51,18 @@ class OpenGL
{
public:
// OpenGL GPU vendors.
enum Vendor
{
VENDOR_ATI_AMD,
VENDOR_NVIDIA,
VENDOR_INTEL,
VENDOR_MESA_SOFT, // Software renderer.
VENDOR_APPLE, // Software renderer.
VENDOR_MICROSOFT, // Software renderer.
VENDOR_UNKNOWN
};
// A rectangle representing an OpenGL viewport or a scissor box.
struct Viewport
{
@@ -176,8 +188,14 @@ public:
**/
int getMaxTextureSize() const;
/**
* Get the GPU vendor of this OpenGL context.
**/
Vendor getVendor() const;
private:
void initVendor();
void initOpenGLFunctions();
void initMaxValues();
void createDefaultTexture();
@@ -187,6 +205,8 @@ private:
float maxAnisotropy;
int maxTextureSize;
Vendor vendor;
// Tracked OpenGL state.
struct
{