current changes
This commit is contained in:
@@ -80,7 +80,6 @@ void DarkRP2D::render(unsigned int delta)
|
||||
#ifndef NDEBUG
|
||||
ImGui_ImplSdlGL3_NewFrame(gWindow);
|
||||
#endif
|
||||
|
||||
//texttest
|
||||
Shader bitmapShader = assets->getShader("bitmapShader");
|
||||
font->drawText(bitmapShader, "Hallo du noob", 25.0f, 25.0f, 1.f, glm::vec3(0.5f, 0.8f, 0.2f));
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "DarkRP2D.h"
|
||||
#include "Utility.h"
|
||||
|
||||
#include <GameEngine.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
static SDL_Window *gWindow = NULL;
|
||||
@@ -17,7 +19,35 @@ static bool gameQuit = false;
|
||||
void dispose();
|
||||
bool initSDL();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
class DarkRP2DD : public GE::Application
|
||||
{
|
||||
void create() override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void update() override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void render() override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void resize() override
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
GE::Application* CreateApplication()
|
||||
{
|
||||
return new DarkRP2DD();
|
||||
}
|
||||
|
||||
/*int main(int argc, char *argv[])
|
||||
{
|
||||
//Init SDL_Window, SDL_Surface, SDL_Renderer
|
||||
if (!initSDL())
|
||||
@@ -40,7 +70,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
dispose();
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
void Game::exit()
|
||||
{
|
||||
|
||||
@@ -85,8 +85,6 @@ void Utility::Debug::ImGuiLogger::Draw(const char *title, bool *p_open)
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
#endif //NDEBUG
|
||||
|
||||
void APIENTRY Utility::openglCallbackFunction(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
@@ -153,6 +151,7 @@ void APIENTRY Utility::openglCallbackFunction(GLenum source,
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif //NDEBUG
|
||||
|
||||
static const char *Errornames[] = {"OpenGL", "SDL", "GLEW", "Other"};
|
||||
void Utility::printWarning(ERROR_TYPE type, std::string msg)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef UTILITY_H
|
||||
#define UTILITY_H
|
||||
#pragma once
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <iostream>
|
||||
@@ -13,10 +12,10 @@
|
||||
namespace Utility
|
||||
{
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
namespace Debug
|
||||
{
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Usage:
|
||||
// static ExampleAppLog my_log;
|
||||
// my_log.AddLog("Hello %d world\n", 123);
|
||||
@@ -45,9 +44,9 @@ struct ImGuiLogger
|
||||
};
|
||||
|
||||
extern ImGuiLogger openGLLogger;
|
||||
|
||||
} // namespace Debug
|
||||
#endif //NDEBUG
|
||||
} // namespace Debug
|
||||
|
||||
|
||||
enum ERROR_TYPE
|
||||
{
|
||||
@@ -72,4 +71,3 @@ void printError(ERROR_TYPE type, std::string msg);
|
||||
void printInfo(ERROR_TYPE type, std::string msg);
|
||||
|
||||
} // namespace Utility
|
||||
#endif // UTILITY_H
|
||||
|
||||
Reference in New Issue
Block a user