11 #import "../os_specific/ios/BView.h"
27 typedef int GLFWwindow;
91 void getSize(GLint* width, GLint* height);
175 void setSize(GLint width, GLint height);
213 static void windowSizeChanged(GLFWwindow* window,
int width,
int height);
217 GLFWwindow *_window =
nullptr;
218 BView *_view =
nullptr;
220 bool _initialized =
false;
221 bool _fullscreen =
false;
GLint getHeight()
Returns the height of the view in pixels.
void terminateView()
Terminate the view.
int UIView
Definition: View.h:30
void attachToUIView(UIView *view)
Attaches (adds as a subview) the underlying UIView to a UIView of your choosing.
virtual ~View()
Virtual destructor.
void setWidth(GLint width)
Sets the width of the view in pixels.
GLint getPositionX()
Returns the x position of the view in pixels.
bool isFullscreen()
Returns true if the view runs in full screen mode.
void setSize(GLint width, GLint height)
Sets the size of the view in pixels.
GLint getPositionY()
Returns the y position of the view in pixels.
static GLint getScreenWidth()
Returns the width of the screen in pixels.
std::shared_ptr< View > ViewPtr
Definition: View.h:225
void setHeight(GLint height)
Sets the height of the view in pixels.
GLint getViewportHeight()
Returns the height of the OpenGL viewport in pixels.
void setPosition(GLint x, GLint y)
Sets the position of the upper left corner of the view.
void getViewportSize(GLint *width, GLint *height)
Gets the size of the OpenGL viewport in pixels.
void setViewportSize(GLint width, GLint height)
Sets the size of the OpenGL viewport in pixels.
bool isRunning()
Returns true if the view is running.
void setFullscreen(bool fullscreen)
Set fullscreen mode.
void bindFramebuffer()
Bind the framebuffer (on iOS only)
int BView
Definition: View.h:31
static void getScreenSize(GLint *width, GLint *height)
Gets the size of the screen in pixels.
GLint getWidth()
Returns the width of the view in pixels.
bool isInitialized()
Returns true if the view has already been initialized.
void presentBuffer()
Displays the buffer to the screen.
GLFWwindow * getWindow()
Returns the GLFW window.
static GLint getScreenHeight()
Returns the height of the screen in pixels.
std::string DEFAULT_WINDOW_TITLE()
Definition: Configuration.cpp:37
GLint getViewportWidth()
Returns the width of the OpenGL viewport in pixels.
void getPosition(GLint *x, GLint *y)
Gets the position of the upper left corner of the view.
GLfloat getAspectRatio()
Returns the aspect ratio of the view.
An abstraction of the view the scene is drawn into.
Definition: View.h:21
static void clearScreen()
Clears the screen.
void getSize(GLint *width, GLint *height)
Gets the size of the view in pixels.
void setContextCurrent()
Sets the context of this view to be current.
BView * getUIView()
Returns the UIView on iOS (only usable in Objective C)
bool initView(std::string windowTitle=bRenderer::DEFAULT_WINDOW_TITLE())
Do all necessary initializations for the view to be ready to run (returns true in the case of success...