Working on RenderTarget example
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "DawnGLFWHost.hpp"
|
||||
#include "game/DawnGame.hpp"
|
||||
#include "dawnopengl.hpp"
|
||||
#include "display/BackBufferRenderTarget.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
@ -53,6 +54,11 @@ int32_t DawnHost::init(std::weak_ptr<DawnGame> game) {
|
||||
if(auto g = game.lock()) {
|
||||
auto result = g->init();
|
||||
if(result != DAWN_GAME_INIT_RESULT_SUCCESS) return result;
|
||||
|
||||
g->renderManager.renderTarget->setSize(
|
||||
DAWN_GLFW_WINDOW_WIDTH_DEFAULT,
|
||||
DAWN_GLFW_WINDOW_HEIGHT_DEFAULT
|
||||
);
|
||||
} else {
|
||||
return DAWN_GLFW_INIT_RESULT_GAME_LOCK_FAILED;
|
||||
}
|
||||
@ -107,6 +113,8 @@ int32_t DawnHost::update(std::weak_ptr<DawnGame> game, float_t delta) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return DAWN_GLFW_UPDATE_RESULT_GAME_LOCK_FAILED;
|
||||
}
|
||||
|
||||
void DawnHost::unload(std::weak_ptr<DawnGame> game) {
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#define DAWN_GLFW_START_RESULT_UPDATE_FAILED -1
|
||||
|
||||
#define DAWN_GLFW_UPDATE_RESULT_GAME_LOCK_FAILED -1
|
||||
|
||||
namespace Dawn {
|
||||
class DawnHostData {
|
||||
public:
|
||||
|
Reference in New Issue
Block a user