OSDN Git Service

Use official headers to define GL_ARB_texture_rectangle.
authorNicolas Capens <capn@google.com>
Wed, 21 Mar 2018 18:25:19 +0000 (14:25 -0400)
committerNicolas Capens <nicolascapens@google.com>
Mon, 26 Mar 2018 20:22:00 +0000 (20:22 +0000)
Fixing https://github.com/KhronosGroup/OpenGL-Registry/pull/149 enabled
including desktop OpenGL headers without conflicts, so we no longer
have to define enums for ARB extensions ourselves.

Change-Id: Ifa05112f1e1d21bb8a22b83519babbbb3e4d6462
Reviewed-on: https://swiftshader-review.googlesource.com/17909
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/compiler/Compiler.h
src/OpenGL/compiler/OutputASM.cpp
src/OpenGL/libGLESv2/Renderbuffer.cpp
src/OpenGL/libGLESv2/utilities.h

index 89acc04..c778626 100644 (file)
@@ -67,29 +67,6 @@ typedef unsigned int GLenum;
 #define GL_FRAGMENT_SHADER                0x8B30
 #define GL_VERTEX_SHADER                  0x8B31
 
-// Note: GL_ARB_texture_rectangle is part of gl2extchromium.h in the Chromium repo
-// GL_ARB_texture_rectangle
-#ifndef GL_ARB_texture_rectangle
-#define GL_ARB_texture_rectangle 1
-
-#ifndef GL_SAMPLER_2D_RECT_ARB
-#define GL_SAMPLER_2D_RECT_ARB 0x8B63
-#endif
-
-#ifndef GL_TEXTURE_BINDING_RECTANGLE_ARB
-#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
-#endif
-
-#ifndef GL_TEXTURE_RECTANGLE_ARB
-#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-#endif
-
-#ifndef GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
-#endif
-
-#endif  // GL_ARB_texture_rectangle
-
 //
 // The base class for the machine dependent compiler to derive from
 // for managing object code from the compile.
index b3385c2..24012a6 100644 (file)
@@ -23,6 +23,8 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #include <GLES3/gl3.h>
+#include <GL/glcorearb.h>
+#include <GL/glext.h>
 
 #include <stdlib.h>
 
index 48a61e9..a970dcf 100644 (file)
@@ -22,8 +22,6 @@
 #include "Texture.h"
 #include "utilities.h"
 
-#include "compiler/Compiler.h"
-
 namespace es2
 {
 RenderbufferInterface::RenderbufferInterface()
index d8e55aa..5959751 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
+#include <GL/glcorearb.h>
+#include <GL/glext.h>
 
 #include <string>