diff options
| author | Felix Wallin <nibbler.v1@gmail.com> | 2010-09-10 20:10:41 (GMT) |
|---|---|---|
| committer | Felix Wallin <nibbler.v1@gmail.com> | 2010-09-10 20:10:41 (GMT) |
| commit | 959f3a24c61f234d7c2cab86072011076b14be17 (patch) | |
| tree | 5d97ba7d1456ad09af76dd9dc20e18b5d634cc74 | |
| parent | b89be2174921dc4f4e15911ce59546ef16f65dd6 (diff) | |
| download | powder-959f3a24c61f234d7c2cab86072011076b14be17.zip powder-959f3a24c61f234d7c2cab86072011076b14be17.tar.gz | |
added a test blendpixel for opengl. No idea if it works
| -rwxr-xr-x | Makefile | 6 | ||||
| -rw-r--r-- | graphics.c | 8 |
2 files changed, 11 insertions, 3 deletions
@@ -3,9 +3,9 @@ SOURCES := *.c CFLAGS := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations LFLAGS := -lSDL -lm -lbz2 -MFLAGS_SSE3 := -march=k8 -DX86 -DX86_SSE3 -msse3 -MFLAGS_SSE2 := -march=k8 -DX86 -DX86_SSE2 -msse2 -MFLAGS_SSE := -march=pentium3 -DX86 -DX86_SSE +MFLAGS_SSE3 := -march=native -DX86 -DX86_SSE3 -msse3 +MFLAGS_SSE2 := -march=native-DX86 -DX86_SSE2 -msse2 +MFLAGS_SSE := -march=native -DX86 -DX86_SSE FLAGS_DBUG := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -pg -O2 -march=k8 -DX86 -DX86_SSE3 -msse3 -lSDL -lm -lbz2 COMPILER := gcc LINUX_TARG := powder-64-sse2 powder-sse powder-sse2 @@ -967,6 +967,14 @@ inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a) #endif { #ifdef OpenGL + if(x<0 || y<0 || x>=XRES || r>=YRES) + return; + if(a!=255) + { + glBegin (GL_QUADS); + glColor4ub(r,g,b,a); + glVertex2i(x, y); + } #else pixel t; if(x<0 || y<0 || x>=XRES || y>=YRES) |
