Bubba-3D  0.9.0
Awesome game engine!
Public Member Functions | List of all members
Window Class Reference

Public Member Functions

 Window (int width, int height, std::string title)
 
void initGL ()
 
void resize (unsigned int width, unsigned int height)
 
void setResizeMethod (void(*resize)(int, int))
 
void start (unsigned int maxFPS)
 
sf::Window * getWindow ()
 
void setIdleMethod (void(*idle)(float sinceStart, float sinceLastMethodCall))
 
void setDisplayMethod (void(*display)(float sinceStart, float sinceLastMethodCall))
 

Detailed Description

Definition at line 23 of file Window.h.

Member Function Documentation

void Window::setDisplayMethod ( void(*)(float sinceStart, float sinceLastMethodCall)  display)

The display function is called when a frame should render. Both parameters are time specified in seconds. The first parameter is the total time since the call to Renderer::start(int maxFPS). The second parameter is the time elapsed since the idle method call for the previous frame.

In this function Renderer::drawScene() should be called.

Definition at line 122 of file Window.cpp.

void Window::setIdleMethod ( void(*)(float sinceStart, float sinceLastMethodCall)  idle)

The idle function is called between each frame. Both parameters are time specified in seconds. The first parameter is the total time since the call to Renderer::start(int maxFPS). The second parameter is the time elapsed since the last idle method call.

This function should contain all the game logic.

Definition at line 126 of file Window.cpp.


The documentation for this class was generated from the following files: