FCT
载入中...
搜索中...
未找到
AutoViewport.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/5/10.
3//
4
5#ifndef FCT_AUTOVIEWPORT_H
6#define FCT_AUTOVIEWPORT_H
8#include "./CallBackHandler.h"
9namespace FCT
10{
11 class Context;
12 class Window;
14 {
15 public:
17 AutoViewport(Vec2 windowSize, Vec2 viewportSize);
18 void ctx(FCT::Context* ctx);
19 void window(Window* wnd);
20 void enable(bool enable);
21 void resize(int width, int height);
22 void computeViewport();
23 void submit(RHI::CommandBuffer* cmdBuf);
24 bool wndPosToViewportPos(Vec2 wndPos,Vec2& viewportPos) const;
25 private:
34 };
35}
36#endif //AUTOREVIEWPORT_H
void ctx(FCT::Context *ctx)
bool wndPosToViewportPos(Vec2 wndPos, Vec2 &viewportPos) const
CallBackEventHandler::CallbackId m_resizeCallBack
void resize(int width, int height)
void window(Window *wnd)
void submit(RHI::CommandBuffer *cmdBuf)
void enable(bool enable)