Mercurial > fife-parpg
comparison engine/core/video/opengl/renderbackendopengl.cpp @ 425:ad7969d9460b
A client can now specify a global color key to be used with all images. The default color key is (255,0,255) in RGB format. Also the client can enable/disable the color key feature by using the setColorKeyEnabled function in the EngineSettings class. By default the color key feature is disabled. fixes[t:451]
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 20 Feb 2010 19:11:01 +0000 |
parents | 14e8087cde2c |
children | ad1f09d954f9 |
comparison
equal
deleted
inserted
replaced
424:e29fbf84cb41 | 425:ad7969d9460b |
---|---|
34 #include "renderbackendopengl.h" | 34 #include "renderbackendopengl.h" |
35 #include "SDL_image.h" | 35 #include "SDL_image.h" |
36 | 36 |
37 namespace FIFE { | 37 namespace FIFE { |
38 | 38 |
39 RenderBackendOpenGL::RenderBackendOpenGL() : RenderBackend() { | 39 RenderBackendOpenGL::RenderBackendOpenGL(const SDL_Color& colorkey) : RenderBackend(colorkey) { |
40 // Get the pixelformat we want. | 40 // Get the pixelformat we want. |
41 SDL_Surface* testsurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, 1, 1, 32, | 41 SDL_Surface* testsurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, 1, 1, 32, |
42 RMASK, GMASK, BMASK ,AMASK); | 42 RMASK, GMASK, BMASK ,AMASK); |
43 | 43 |
44 m_rgba_format = *(testsurface->format); | 44 m_rgba_format = *(testsurface->format); |