mirror of https://github.com/haya3218/SDfmL.git
cameras :)
This commit is contained in:
parent
34bb25d838
commit
dfb3f5e6bf
|
@ -397,6 +397,8 @@ namespace sdfml {
|
||||||
config.close();
|
config.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GPU_Camera camera;
|
||||||
|
|
||||||
inline int init(float width = DEFAULT_WINDOW_WIDTH, float height = DEFAULT_WINDOW_HEIGHT, string window_name = "Unknown",
|
inline int init(float width = DEFAULT_WINDOW_WIDTH, float height = DEFAULT_WINDOW_HEIGHT, string window_name = "Unknown",
|
||||||
int win_flags = SDL_WINDOW_OPENGL|SDL_WINDOW_ALLOW_HIGHDPI|SDL_WINDOW_SHOWN) {
|
int win_flags = SDL_WINDOW_OPENGL|SDL_WINDOW_ALLOW_HIGHDPI|SDL_WINDOW_SHOWN) {
|
||||||
std::ofstream logFile;
|
std::ofstream logFile;
|
||||||
|
@ -432,6 +434,10 @@ namespace sdfml {
|
||||||
sound.initSF(soundfont);
|
sound.initSF(soundfont);
|
||||||
llog("SoLoud", " is now initialized.", NORMAL, __FILENAME__, __LINE__);
|
llog("SoLoud", " is now initialized.", NORMAL, __FILENAME__, __LINE__);
|
||||||
|
|
||||||
|
camera = GPU_GetDefaultCamera();
|
||||||
|
GPU_EnableCamera(mContext.gpu_render, true);
|
||||||
|
GPU_SetCamera(mContext.gpu_render, &camera);
|
||||||
|
|
||||||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||||
|
|
||||||
mContext.size = {width, height};
|
mContext.size = {width, height};
|
||||||
|
|
Loading…
Reference in New Issue