summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 06:12:24 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 06:12:24 +0100
commitbf44fa581082fe59f165ad55e2545d06eb2310bf (patch)
treeb0f4eae05bb2ec4f0aeccc6da2451abb6f132764
parenta240df3979e176a5cf3fb4ccd9338695e8d917e3 (diff)
downloadglslview-bf44fa581082fe59f165ad55e2545d06eb2310bf.tar
glslview-bf44fa581082fe59f165ad55e2545d06eb2310bf.zip
glslwrite: add support for alpha channel
-rw-r--r--glslview.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/glslview.c b/glslview.c
index c9d8915..828ac3f 100644
--- a/glslview.c
+++ b/glslview.c
@@ -193,6 +193,11 @@ int main(int argc, char *argv[]) {
SDL_Init(SDL_INIT_VIDEO);
+ SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
+ SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
+ SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
+ SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
+
SDL_Window *window = SDL_CreateWindow("glslwrite", 0, 0, 800, 800, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
SDL_GL_CreateContext(window);