Ticket #7989: sdl_gl.2.diff

File sdl_gl.2.diff, 1.4 KB (added by SF/luke_br, 18 years ago)

ops, fallback to RGB now working (final version)

Line 
136a37,38
2> int glColorTable(int, int, int, int, int, void *){ return 0; }
3> int glGetColorTable(int, int, int, void *){ return 0; }
438c40,42
5< #define OGL_1_1
6---
7> bool OGL_1_1=true;
8> #else
9> bool OGL_1_1=false;
1042c46
11<
12---
13> FB2GL fb2gl;
14241c245
15< fb2gl_palette(i+start,b[0],b[1],b[2]);
16---
17> fb2gl.palette(i+start,b[0],b[1],b[2]);
18274,278c278,287
19< #ifdef OGL_1_1
20< gl_flags |= (FB2GL_RGBA | FB2GL_EXPAND);
21< #endif
22<
23< fb2gl_init(640,480,0,70,gl_flags);
24---
25> if (OGL_1_1) { // OpenGL 1.1
26> gl_flags |= (FB2GL_RGBA | FB2GL_EXPAND);
27> fb2gl.init(640,480,0,70,gl_flags );
28> }
29> else { // OpenGL 1.2
30> if (!fb2gl.init(640,480,0,70,gl_flags)) { // Try to use 8bpp textures
31> gl_flags |= (FB2GL_RGBA | FB2GL_EXPAND); // using RGBA textures
32> fb2gl.init(640,480,0,70,gl_flags);
33> }
34> }
35483c492
36< fb2gl_set_palette(_palette_changed_first,
37---
38> fb2gl.setPalette(_palette_changed_first,
39489c498
40< fb2gl_update(sdl_tmpscreen->pixels,320,200,320,0,_current_shake_pos);
41---
42> fb2gl.update(sdl_tmpscreen->pixels,320,200,320,0,_current_shake_pos);
43691,692c700,701
44< fb2gl_set_palette(0,256);
45< fb2gl_update(sdl_tmpscreen->pixels,320,200,320,0,_current_shake_pos);
46---
47> fb2gl.setPalette(0,256);
48> fb2gl.update(sdl_tmpscreen->pixels,320,200,320,0,_current_shake_pos);
49706c715
50< SDL_WM_ToggleFullScreen(screen);
51---
52> SDL_WM_ToggleFullScreen(fb2gl.screen);