1 Star 0 Fork 245

blog/CrossApp

forked from 9miao.com/CrossApp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
AngleBase.h 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
栗元峰 提交于 2014-05-19 19:19 +08:00 . &&Demo上传
#pragma once
#include "DirectXHelper.h"
#include "EGL/egl.h"
#include "EGL/eglext.h"
#include "EGL/eglplatform.h"
#include "GLES2/gl2.h"
#include "GLES2/gl2ext.h"
#include "winrtangle.h"
// Helper class that initializes DirectX APIs for 3D rendering.
ref class AngleBase abstract
{
internal:
AngleBase();
virtual void Initialize();
virtual void CreateDeviceResources();
virtual void UpdateDevice(ID3D11Device1* device, ID3D11DeviceContext1* context, ID3D11RenderTargetView* renderTargetView);
virtual void UpdateForWindowSizeChange(float width, float height);
virtual void CreateWindowSizeDependentResources();
virtual void OnOrientationChanged(Windows::Graphics::Display::DisplayOrientations orientation);
virtual void CreateGLResources() = 0;
void Render();
protected:
virtual void OnRender() = 0;
bool InitializeAngle();
void CloseAngle();
protected private:
// Direct3D Objects.
Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_d3dRenderTargetView;
D3D_FEATURE_LEVEL m_featureLevel;
// Cached renderer properties.
Windows::Foundation::Size m_renderTargetSize;
Windows::Foundation::Rect m_windowBounds;
Windows::Graphics::Display::DisplayOrientations m_orientation;
// Angle EGL
bool m_bAngleInitialized;
EGLDisplay m_eglDisplay;
EGLContext m_eglContext;
EGLSurface m_eglSurface;
Microsoft::WRL::ComPtr<IWinrtEglWindow> m_eglWindow;
Microsoft::WRL::ComPtr<IWinPhone8XamlD3DWindow> m_eglPhoneWindow;
DirectX::XMMATRIX m_orientationMatrix;
float m_aspectRatio;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/blog/CrossApp.git
git@gitee.com:blog/CrossApp.git
blog
CrossApp
CrossApp
branch_Liyuanfeng

搜索帮助