CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Windows/GPU/D3D11Context.h
Views: 1401
// Copyright (c) 2015- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "ppsspp_config.h"2021#include "Common/CommonWindows.h"22#include "Windows/GPU/WindowsGraphicsContext.h"23#include <d3d11.h>24#include <d3d11_1.h>2526class DrawContext;2728class D3D11Context : public WindowsGraphicsContext {29public:30bool Init(HINSTANCE hInst, HWND window, std::string *error_message) override;31void Shutdown() override;3233void Resize() override;3435Draw::DrawContext *GetDrawContext() override { return draw_; }3637private:38HRESULT CreateTheDevice(IDXGIAdapter *adapter);3940void LostBackbuffer();41void GotBackbuffer();4243Draw::DrawContext *draw_ = nullptr;44IDXGISwapChain *swapChain_ = nullptr;45ID3D11Device *device_ = nullptr;46ID3D11Device1 *device1_ = nullptr;47ID3D11DeviceContext *context_ = nullptr;48ID3D11DeviceContext1 *context1_ = nullptr;4950ID3D11Texture2D *bbRenderTargetTex_ = nullptr;51ID3D11RenderTargetView *bbRenderTargetView_ = nullptr;5253#ifdef _DEBUG54ID3D11Debug *d3dDebug_ = nullptr;55ID3D11InfoQueue *d3dInfoQueue_ = nullptr;56#endif57D3D_FEATURE_LEVEL featureLevel_ = D3D_FEATURE_LEVEL_11_0;58int adapterId = -1;59HDC hDC = nullptr; // Private GDI Device Context60HWND hWnd_ = nullptr; // Holds Our Window Handle61HMODULE hD3D11 = nullptr;62int width = 0;63int height = 0;64int swapInterval_ = 0;65};666768