#ifndef NOOPENGL
options_menu->additem(MN_TOGGLE,"OpenGL",use_gl,0, MNID_OPENGL);
#else
- options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl,MNID_OPENGL);
+ options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl, 0, MNID_OPENGL);
#endif
options_menu->additem(MN_TOGGLE,"Fullscreen",use_fullscreen,0, MNID_FULLSCREEN);
if(audio_device)
SurfaceImpl*
SurfaceData::create()
{
+#ifndef NOOPENGL
if (use_gl)
return create_SurfaceOpenGL();
else
return create_SurfaceSDL();
+#else
+ return create_SurfaceSDL();
+#endif
}
SurfaceSDL*
SurfaceOpenGL*
SurfaceData::create_SurfaceOpenGL()
{
+#ifndef NOOPENGL
switch(type)
{
case LOAD:
case SURFACE:
return new SurfaceOpenGL(surface, use_alpha);
}
+#endif
assert(0);
}
-
+#ifndef NOOPENGL
/* Quick utility function for texture creation */
static int power_of_two(int input)
{
}
return value;
}
+#endif
Surface::Surface(SDL_Surface* surf, int use_alpha)
: data(surf, use_alpha), w(0), h(0)
int draw_part(float sx, float sy, float x, float y, float w, float h, Uint8 alpha, bool update);
};
+#ifndef NOOPENGL
class SurfaceOpenGL : public SurfaceImpl
{
public:
private:
void create_gl(SDL_Surface * surf, GLuint * tex);
};
+#endif
#endif /*SUPERTUX_TEXTURE_H*/