4 #include "IAttributeFields.h" 7 #ifndef GLFW_EXPOSE_NATIVE_WIN32 8 #define GLFW_EXPOSE_NATIVE_WIN32 11 #ifndef GLFW_EXPOSE_NATIVE_WGL 12 #define GLFW_EXPOSE_NATIVE_WGL 15 #include "GLFW/glfw3native.h" 59 static CParaEngineGLView* createWithRect(
const std::string& viewName,
const CCRect& rect,
float frameZoomFactor = 1.0f);
61 static CParaEngineGLView* createWithFullScreen(
const std::string& viewName,
const GLFWvidmode &videoMode, GLFWmonitor *monitor);
66 float getFrameZoomFactor()
const;
68 void setViewPortInPoints(
float x,
float y,
float w,
float h);
69 void setScissorInPoints(
float x,
float y,
float w,
float h);
71 bool windowShouldClose();
73 GLFWwindow* getWindow()
const {
return _mainWindow; }
78 void setIMEKeyboardState(
bool bOpen);
83 void setFrameZoomFactor(
float zoomFactor);
88 void setCursorVisible(
bool isVisible);
93 void enableRetina(
bool enabled);
101 void setViewName(
const std::string viewname) { _viewName = viewname; }
108 const CCRect& getViewPortRect()
const;
113 bool IsKeyPressed(DWORD nKey);
121 void setFrameSize(
float width,
float height);
124 void SetWindowText(
const char* pChar);
127 void FixWindowSize(
bool fixed);
129 HWND getWin32Window() {
return glfwGetWin32Window(_mainWindow); };
135 bool initWithRect(
const std::string& viewName,
const CCRect& rect,
float frameZoomFactor);
136 bool initWithFullScreen(
const std::string& viewName);
137 bool initWithFullscreen(
const std::string& viewname,
const GLFWvidmode &videoMode, GLFWmonitor *monitor);
141 void updateFrameSize();
144 void onGLFWError(
int errorID,
const char* errorDesc);
145 void onGLFWMouseCallBack(GLFWwindow* window,
int button,
int action,
int modify);
146 void onGLFWMouseMoveCallBack(GLFWwindow* window,
double x,
double y);
147 void onGLFWMouseScrollCallback(GLFWwindow* window,
double x,
double y);
148 void onGLFWKeyCallback(GLFWwindow* window,
int key,
int scancode,
int action,
int mods);
149 void onGLFWCharCallback(GLFWwindow* window,
unsigned int character);
150 void onGLFWWindowPosCallback(GLFWwindow* windows,
int x,
int y);
151 void onGLFWframebuffersize(GLFWwindow* window,
int w,
int h);
152 void onGLFWWindowSizeFunCallback(GLFWwindow *window,
int width,
int height);
153 void onGLFWWindowIconifyCallback(GLFWwindow* window,
int iconified);
161 const Size& getFrameSize()
const;
167 GLFWwindow* _mainWindow;
168 GLFWmonitor* _monitor;
170 bool _isRetinaEnabled;
171 bool _isInRetinaMonitor;
180 float _frameZoomFactor;
182 std::string _viewName;
188 Size _designResolutionSize;
bool isRetinaEnabled() const
Check whether retina display is enabled.
Definition: ParaEngineGLView.h:96
int getRetinaFactor() const
Get retina factor.
Definition: ParaEngineGLView.h:99
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ParaEngineGLView.h:39
Definition: ParaEngineGLView.cpp:286
base class for object, such as CBaseObject, IAttributeObject, GUI object.
Definition: PERef.h:287
There are six opengl Context Attrs.
Definition: ParaEngineGLView.h:26
static GLContextAttrs _glContextAttrs
The OpenGL context attrs.
Definition: ParaEngineGLView.h:55