mirror of
				https://github.com/haya3218/SDfmL.git
				synced 2024-08-14 23:57:09 +00:00 
			
		
		
		
	cameras :)
This commit is contained in:
		
							parent
							
								
									34bb25d838
								
							
						
					
					
						commit
						dfb3f5e6bf
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -397,6 +397,8 @@ namespace sdfml {
 | 
			
		|||
        config.close();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static GPU_Camera camera;
 | 
			
		||||
 | 
			
		||||
    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) {
 | 
			
		||||
        std::ofstream logFile;
 | 
			
		||||
| 
						 | 
				
			
			@ -432,6 +434,10 @@ namespace sdfml {
 | 
			
		|||
        sound.initSF(soundfont);
 | 
			
		||||
        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);
 | 
			
		||||
 | 
			
		||||
        mContext.size = {width, height};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue