mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-13 23:18:16 +00:00
hyperweb compiles
This commit is contained in:
parent
978022025a
commit
334ffd644a
@ -358,7 +358,12 @@ void display_data::set_projection(int ed) {
|
||||
}
|
||||
println(hlog, "maxd = ", maxd);
|
||||
|
||||
#if !ISWEB
|
||||
glTexImage3D(GL_TEXTURE_3D, 0, 34836 /*GL_RGBA32F*/, PRECX, PRECX, PRECZ, 0, GL_RGBA, GL_FLOAT, xbuffer);
|
||||
#else
|
||||
// glTexStorage3D(GL_TEXTURE_3D, 1, 34836 /*GL_RGBA32F*/, PRECX, PRECX, PRECZ);
|
||||
// glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, PRECX, PRECY, PRECZ, GL_RGBA, GL_FLOAT, xbuffer);
|
||||
#endif
|
||||
delete[] xbuffer;
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ namespace hr {
|
||||
const char *wheresounds;
|
||||
}
|
||||
|
||||
#include "hyper.h"
|
||||
#include "hyper.cpp"
|
||||
|
||||
namespace hr {
|
||||
|
||||
|
@ -1076,7 +1076,11 @@ EX namespace slr {
|
||||
" float mina = 0.;"
|
||||
" float maxa = PI/4.;"
|
||||
" lo_gphi = 0.; lo_s = r; lo_alpha = 0.;"
|
||||
#if ISWEB
|
||||
" for(int it=0; it<50; it++) { if(it >= uIterations) break; "
|
||||
#else
|
||||
" for(int it=0; it<uIterations; it++) {"
|
||||
#endif
|
||||
" alpha = (mina + maxa) / 2.;"
|
||||
" c = sqrt(cos(2. * alpha));"
|
||||
" s = asinh(sinh(r) / cos(alpha) * c) / c;"
|
||||
@ -1090,7 +1094,11 @@ EX namespace slr {
|
||||
" int next_nan = 1;"
|
||||
" float mina = PI/4.;"
|
||||
" float maxa = PI/2.;"
|
||||
#if ISWEB
|
||||
" for(int it=0; it<50; it++) { if(it >= uIterations) break; "
|
||||
#else
|
||||
" for(int it=0; it<uIterations; it++) {"
|
||||
#endif
|
||||
" alpha = (mina + maxa) / 2.;"
|
||||
" c = sqrt(-cos(2. * alpha));"
|
||||
" if(sinh(r) * c > bound * cos(alpha)) { next_nan = 1; maxa = alpha; continue; }"
|
||||
@ -1101,7 +1109,11 @@ EX namespace slr {
|
||||
" }"
|
||||
" if(next_nan != 0) {"
|
||||
" mina = PI/4.; "
|
||||
#if ISWEB
|
||||
" for(int it=0; it<50; it++) { if(it >= uIterations) break; "
|
||||
#else
|
||||
" for(int it=0; it<uIterations; it++) {"
|
||||
#endif
|
||||
" alpha = (mina + maxa) / 2.;"
|
||||
" c = sqrt(-cos(2. * alpha));"
|
||||
" float z = sinh(r) * c / cos(alpha);"
|
||||
|
@ -695,6 +695,8 @@ void init() {
|
||||
bool ball = (sp == shader_projection::ball);
|
||||
bool flatten = (sp == shader_projection::flatten);
|
||||
|
||||
if(ssol && ISWEB) continue;
|
||||
|
||||
programs[i][j] = new GLprogram(stringbuilder(
|
||||
1, "#define PI 3.14159265358979324\n",
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user