Initial implementation of experimental gamma ramp API.

This commit is contained in:
Camilla Berglund
2010-10-13 04:04:43 +02:00
parent ffba674dbf
commit 2630d4968c
16 changed files with 647 additions and 31 deletions
+15
View File
@@ -361,6 +361,8 @@ extern "C" {
#define GLFW_VERSION_UNAVAILABLE 0x00070007
#define GLFW_PLATFORM_ERROR 0x00070008
/* Gamma ramps */
#define GLFW_GAMMA_RAMP_SIZE 256
/*************************************************************************
* Typedefs
@@ -379,6 +381,14 @@ typedef struct
int greenBits;
} GLFWvidmode;
/* Gamma ramp */
typedef struct
{
unsigned short red[GLFW_GAMMA_RAMP_SIZE];
unsigned short green[GLFW_GAMMA_RAMP_SIZE];
unsigned short blue[GLFW_GAMMA_RAMP_SIZE];
} GLFWgammaramp;
/* Function pointer types */
typedef void (* GLFWwindowsizefun)(GLFWwindow,int,int);
typedef int (* GLFWwindowclosefun)(GLFWwindow);
@@ -410,6 +420,11 @@ GLFWAPI const char* glfwErrorString(int error);
GLFWAPI int glfwGetVideoModes(GLFWvidmode* list, int maxcount);
GLFWAPI void glfwGetDesktopMode(GLFWvidmode* mode);
/* Gamma ramp functions */
GLFWAPI void glfwSetGammaFormula(float gamma, float blacklevel, float gain);
GLFWAPI void glfwGetGammaRamp(GLFWgammaramp* ramp);
GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp);
/* Window handling */
GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode, const char* title, GLFWwindow share);
GLFWAPI void glfwOpenWindowHint(int target, int hint);