MQEngine
载入中...
搜索中...
未找到
GraphicsEnv.h
浏览该文件的文档.
1
//
2
// Created by MaaBlock on 2025/9/27.
3
//
4
5
#ifndef GRAPHICSENV_H
6
#define GRAPHICSENV_H
7
#include "
application.h
"
8
9
namespace
FCT
10
{
11
class
Runtime;
12
class
Context
;
13
class
Window
;
14
}
15
namespace
MQEngine
16
{
17
class
GraphicsEnv
18
{
19
public
:
20
GraphicsEnv
(FCT::Runtime& rt,
RenderConfig
renderConfig) :
m_rt
(rt)
21
{
22
m_ctx
= rt.createContext();
23
m_wnd
= rt.createWindow(800, 600, renderConfig.
windowTitle
);
24
m_ctx
->create();
25
m_wnd
->bind(
m_ctx
);
26
}
27
~GraphicsEnv
()
28
{
29
m_ctx
->release();
30
m_wnd
->release();
31
}
32
FCT::Window*
wnd
()
const
{
return
m_wnd
; }
33
FCT::Context*
ctx
()
const
{
return
m_ctx
; }
34
private
:
35
FCT::Runtime&
m_rt
;
36
FCT::Context*
m_ctx
;
37
FCT::Window*
m_wnd
;
38
};
39
}
40
#endif
//GRAPHICSENV_H
application.h
MQEngine::GraphicsEnv::wnd
FCT::Window * wnd() const
定义
GraphicsEnv.h:32
MQEngine::GraphicsEnv::m_wnd
FCT::Window * m_wnd
定义
GraphicsEnv.h:37
MQEngine::GraphicsEnv::GraphicsEnv
GraphicsEnv(FCT::Runtime &rt, RenderConfig renderConfig)
定义
GraphicsEnv.h:20
MQEngine::GraphicsEnv::m_ctx
FCT::Context * m_ctx
定义
GraphicsEnv.h:36
MQEngine::GraphicsEnv::m_rt
FCT::Runtime & m_rt
定义
GraphicsEnv.h:35
MQEngine::GraphicsEnv::ctx
FCT::Context * ctx() const
定义
GraphicsEnv.h:33
MQEngine::GraphicsEnv::~GraphicsEnv
~GraphicsEnv()
定义
GraphicsEnv.h:27
FCT
定义
engine.cpp:21
MQEngine
Entrypoint for the program.
定义
application.h:5
MQEngine::Context
FCT::Context Context
定义
EngineGlobal.h:15
MQEngine::Window
FCT::Window Window
定义
thirdparty.h:27
MQEngine::RenderConfig
定义
application.h:11
MQEngine::RenderConfig::windowTitle
const char * windowTitle
定义
application.h:13
MQEngine
Engine
src
core
GraphicsEnv.h
制作者
1.14.0