46 lines
950 B
C++
46 lines
950 B
C++
#include "rendering.h"
|
|
#include "tier0/platform.h"
|
|
#include "tier1/utlvector.h"
|
|
#include "console.h"
|
|
#include "tier1/commandline.h"
|
|
#include "input.h"
|
|
|
|
#define NS_PRIVATE_IMPLEMENTATION
|
|
#define MTL_PRIVATE_IMPLEMENTATION
|
|
#define MTK_PRIVATE_IMPLEMENTATION
|
|
#define CA_PRIVATE_IMPLEMENTATION
|
|
|
|
#include "tier0/minmax_off.h"
|
|
#include "Metal/Metal.hpp"
|
|
|
|
#include "SDL3/SDL.h"
|
|
#include "SDL3/SDL_keycode.h"
|
|
#include "SDL3/SDL_metal.h"
|
|
#include "SDL3/SDL_events.h"
|
|
#include "tier0/minmax.h"
|
|
|
|
SDL_Window *g_window;
|
|
|
|
void IInput::SetMouseMode( EMouseMode mode )
|
|
{
|
|
switch (mode)
|
|
{
|
|
case MOUSE_MODE_GAME:
|
|
SDL_SetWindowRelativeMouseMode(g_window, true);
|
|
return;
|
|
default:
|
|
SDL_SetWindowRelativeMouseMode(g_window, false);
|
|
return;
|
|
}
|
|
}
|
|
|
|
void IVideo::Init()
|
|
{
|
|
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS))
|
|
V_printf("%s\n",SDL_GetError());
|
|
g_window = SDL_CreateWindow("rtt", 1280, 720, SDL_WINDOW_VULKAN);
|
|
}
|
|
void IVideo::Frame( float fDelta )
|
|
{
|
|
}
|