SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#ifndef UTILS_H
2#define UTILS_H
3
13{
14 int args = lua_gettop(lua);
15 if (args != 1)
16 {
17 const std::string msg = "setText expects a string as argument.\n";
18 lua_pushlstring(lua, msg.c_str(), msg.length());
19 return lua_error(lua);
20 }
21
23 s.read(lua, 1);
24
25 text = s.characters;
26
27 return 0;
28}
29
37{
39 return 1;
40}
41
42#endif /* UTILS_H */
glm::vec< L, float, glm::qualifier::highp > vec
Definition commandLine.h:214
Interop for a string in Lua.
Definition LuaString.h:12
void read(lua_State *lua, int index)
Read the string from stack index index.
Definition LuaString.h:28
int lua_setText(lua_State *lua)
Set the on screen text.
Definition utils.h:12
uint64_t frame
Definition visualisationState.h:125
int lua_getFrame(lua_State *lua)
Get the current frame number.
Definition utils.h:36
std::string text
Definition visualisationState.h:124