Showing
5 changed files
with
15 additions
and
6 deletions
... | ... | @@ -271,7 +271,9 @@ end |
271 | 271 | ---------------------------------------------------------------------------- |
272 | 272 | |
273 | 273 | function _M:rewriteShaderFrag(code) |
274 | - code = [[varying vec2 te4_uv; | |
274 | + code = [[ | |
275 | + precision highp float; | |
276 | + varying vec2 te4_uv; | |
275 | 277 | varying vec4 te4_fragcolor; |
276 | 278 | ]]..code |
277 | 279 | code = code:gsub("gl_TexCoord%[0%]", "te4_uv") |
... | ... | @@ -280,7 +282,9 @@ function _M:rewriteShaderFrag(code) |
280 | 282 | end |
281 | 283 | |
282 | 284 | function _M:rewriteShaderVert(code) |
283 | - code = [[attribute vec2 te4_position; | |
285 | + code = [[ | |
286 | + precision highp float; | |
287 | + attribute vec2 te4_position; | |
284 | 288 | attribute vec2 te4_texcoord; |
285 | 289 | attribute vec4 te4_color; |
286 | 290 | varying vec2 te4_uv; | ... | ... |
... | ... | @@ -2230,6 +2230,9 @@ function util.showMainMenu(no_reboot, reboot_engine, reboot_engine_version, rebo |
2230 | 2230 | if no_reboot then |
2231 | 2231 | local Module = require("engine.Module") |
2232 | 2232 | local ms = Module:listModules(true) |
2233 | + -- __load_module="tome" | |
2234 | + -- __player_name="player" | |
2235 | + -- __player_new=nil | |
2233 | 2236 | local mod = ms[__load_module] |
2234 | 2237 | Module:instanciate(mod, __player_name, __player_new, true) |
2235 | 2238 | else | ... | ... |
... | ... | @@ -148,8 +148,8 @@ function _M:uiLogin(uis) |
148 | 148 | local str = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile"} |
149 | 149 | local bt = Button.new{text="Login", width=50, fct=function() self:login() end} |
150 | 150 | local btr = Button.new{text="Register", fct=function() self:register() end} |
151 | - self.c_login = Textbox.new{title="Username: ", text="", chars=16, max_len=20, fct=function(text) self:login() end} | |
152 | - self.c_pass = Textbox.new{title="Password: ", size_title=self.c_login.title, text="", chars=16, max_len=20, hide=true, fct=function(text) self:login() end} | |
151 | + self.c_login = Textbox.new{title="Username: ", text="t8", chars=16, max_len=20, fct=function(text) self:login() end} | |
152 | + self.c_pass = Textbox.new{title="Password: ", size_title=self.c_login.title, text="toto", chars=16, max_len=20, hide=true, fct=function(text) self:login() end} | |
153 | 153 | |
154 | 154 | uis[#uis+1] = {left=10, bottom=bt.h + self.c_login.h + self.c_pass.h + str.h, ui=Separator.new{dir="vertical", size=self.iw - 20}} |
155 | 155 | uis[#uis+1] = {hcenter=0, bottom=bt.h + self.c_login.h + self.c_pass.h, ui=str} | ... | ... |
... | ... | @@ -2111,8 +2111,10 @@ function _M:display(nb_keyframes) |
2111 | 2111 | self.now = core.game.getTime() |
2112 | 2112 | |
2113 | 2113 | -- Now the map, if any |
2114 | +core.display.countDraws() | |
2114 | 2115 | game:displayMap(nb_keyframes) |
2115 | - | |
2116 | +print("==map draws", core.display.countDraws()) | |
2117 | +do return end | |
2116 | 2118 | if self.no_ui then return end |
2117 | 2119 | |
2118 | 2120 | core.display.countDraws() | ... | ... |
... | ... | @@ -703,7 +703,7 @@ void on_redraw() |
703 | 703 | float seconds = (t - T0) / 1000.0; |
704 | 704 | float fps = Frames / seconds; |
705 | 705 | reference_fps = fps; |
706 | -// printf("%d frames in %g seconds = %g FPS (%d keyframes)\n", Frames, seconds, fps, count_keyframes); | |
706 | + printf("%d frames in %g seconds = %g FPS (%d keyframes)\n", Frames, seconds, fps, count_keyframes); | |
707 | 707 | T0 = t; |
708 | 708 | Frames = 0; |
709 | 709 | last_keyframe = 0; | ... | ... |
-
Please register or login to post a comment