mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-17 11:30:09 +00:00
enabled antialiasing in web
This commit is contained in:
parent
c8e950cd40
commit
3b5733c935
@ -1137,12 +1137,10 @@ void setvideomode() {
|
||||
flags = SDL_OPENGL | SDL_HWSURFACE | SDL_GL_DOUBLEBUFFER;
|
||||
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
|
||||
if(vsync_off) disable_vsync();
|
||||
#if !ISWEB
|
||||
if(vid.antialias & AA_MULTI) {
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, (vid.antialias & AA_MULTI16) ? 16 : 4);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1168,12 +1166,15 @@ void setvideomode() {
|
||||
|
||||
#if CAP_GL
|
||||
if(vid.usingGL) {
|
||||
#if !ISWEB
|
||||
if(vid.antialias & AA_MULTI)
|
||||
|
||||
if(vid.antialias & AA_MULTI) {
|
||||
glEnable(GL_MULTISAMPLE);
|
||||
else
|
||||
glEnable(GL_MULTISAMPLE_ARB);
|
||||
}
|
||||
else {
|
||||
glDisable(GL_MULTISAMPLE);
|
||||
#endif
|
||||
glDisable(GL_MULTISAMPLE_ARB);
|
||||
}
|
||||
|
||||
glViewport(0, 0, vid.xres, vid.yres);
|
||||
glhr::init();
|
||||
|
@ -145,7 +145,7 @@ void initConfig() {
|
||||
// basic graphics
|
||||
|
||||
addsaver(vid.usingGL, "usingGL", true);
|
||||
addsaver(vid.antialias, "antialias", AA_NOGL | AA_FONT | AA_LINES | AA_LINEWIDTH | AA_VERSION);
|
||||
addsaver(vid.antialias, "antialias", AA_NOGL | AA_FONT | (ISWEB ? AA_MULTI : AA_LINES) | AA_LINEWIDTH | AA_VERSION);
|
||||
addsaver(vid.linewidth, "linewidth", 1);
|
||||
addsaver(linepatterns::width, "pattern-linewidth", 1);
|
||||
addsaver(vid.scale, "scale", 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user