Rise
The Vieneo Province
Loading...
Searching...
No Matches
ClientRuntime11.h
Go to the documentation of this file.
1#pragma once
2#include "ClientRenderer11.h"
3#include "Window11.h"
4#include <cassert>
5#include <cstdio>
6#include <cwchar>
7#include <mmsystem.h>
8#include <commctrl.h>
9#include <shellapi.h>
10
11namespace Rendering
12{
13 void AttachClientRuntime(Window11* window,RenderDevice* renderer);
16 HWND ClientWindow();
17 HINSTANCE ClientInstance();
18 double ClientTime();
19 double ClientAbsoluteTime();
20 float ClientFPS();
21 bool ClientWindowed();
23 const wchar_t* ClientDeviceStats();
24 const wchar_t* ClientFrameStats();
26 const wchar_t* ErrorString(HRESULT code);
27 HRESULT TraceFailure(const wchar_t* operation,HRESULT code);
28 HRESULT LoadTextureResource(RenderDevice* owner,HMODULE module,LPCWSTR id,RenderTexture** result,UINT levels=0);
29}
30
31#ifndef SAFE_RELEASE
32#define SAFE_RELEASE(value) do {if(value){(value)->Release();(value)=nullptr;}} while(0)
33#endif
34#ifndef SAFE_DELETE
35#define SAFE_DELETE(value) do {delete (value);(value)=nullptr;} while(0)
36#endif
37#ifndef SAFE_DELETE_ARRAY
38#define SAFE_DELETE_ARRAY(value) do {delete[] (value);(value)=nullptr;} while(0)
39#endif
40#ifndef V
41#define V(expression) do {hr=(expression);if(FAILED(hr))Rendering::TraceFailure(L"Render call failed",hr);} while(0)
42#endif
43#ifndef V_RETURN
44#define V_RETURN(expression) do {hr=(expression);if(FAILED(hr)){Rendering::TraceFailure(L"Render call failed",hr);return hr;}} while(0)
45#endif
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
HWND ClientWindow()
void AttachClientRuntime(Window11 *window, RenderDevice *device)
float ClientFPS()
HRESULT TraceFailure(const wchar_t *operation, HRESULT code)
Window11 * ClientHost()
HRESULT LoadTextureResource(RenderDevice *owner, HMODULE module, LPCWSTR id, RenderTexture **result, UINT levels)
double ClientTime()
const wchar_t * ClientFrameStats()
double ClientAbsoluteTime()
const wchar_t * ErrorString(HRESULT code)
RenderDevice * ClientRenderer()
const SurfaceDescription * ClientBackBufferDescription()
HINSTANCE ClientInstance()
HRESULT ClientToggleFullscreen()
const wchar_t * ClientDeviceStats()
bool ClientWindowed()