Added abstracted window
Added Lua interpreter
This commit is contained in:
		| @ -3,6 +3,15 @@ | ||||
| #include <MyGraphicsEngine/Window.h> | ||||
| #include <string> | ||||
|  | ||||
| extern "C" | ||||
|  { | ||||
|     #include "lauxlib.h" | ||||
|     #include "lua.h" | ||||
|     #include "lualib.h" | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| int main (int argc, char *argv[] ){ | ||||
|  | ||||
|  | ||||
| @ -15,9 +24,22 @@ int main (int argc, char *argv[] ){ | ||||
|     } | ||||
|     std::string vertexShaderSource = "build/SandboxApplication/Debug/test.vs"; | ||||
|     std::string fragmentShaderSource = "build/SandboxApplication/Debug/test.fs"; | ||||
|     Shader(vertexShaderSource, fragmentShaderSource); | ||||
|     //Shader shader (vertexShaderSource, fragmentShaderSource); | ||||
|  | ||||
|     lua_State* L = luaL_newstate(); | ||||
|     luaL_openlibs(L); | ||||
|     luaL_dostring(L, "print('BarinkEngine')"); | ||||
|     luaL_dofile(L,"script.lua"); | ||||
|  | ||||
|     glClearColor(0.2f, 0.2f, 0.2f, 1.0f); | ||||
|  | ||||
|      | ||||
|  | ||||
|     while (!GameWindow.WindowShouldClose()) { | ||||
|         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT) ; | ||||
|  | ||||
|  | ||||
|     GameWindow.EnterLoop(); | ||||
|         GameWindow.Poll(); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user