2012-07-19 01:14:17 +00:00
# ifndef _RENDERER_H_
# define _RENDERER_H_
# include <vector>
2012-07-20 01:08:29 +00:00
# include <string>
2013-06-02 19:34:50 +00:00
# include "Vector2.h"
2012-10-24 15:28:37 +00:00
# include "platform.h"
# include GLHEADER
//#include "Font.h"
2012-07-19 16:13:27 +00:00
class GuiComponent ;
2012-10-24 15:28:37 +00:00
class Font ;
2012-07-19 16:13:27 +00:00
2012-09-07 21:44:07 +00:00
//The Renderer provides several higher-level functions for drawing (rectangles, text, etc.).
//Defined in multiple files - Renderer.cpp has the GuiComponent stuff, Renderer_draw_* includes renderer-specific drawing implementations, and Renderer_init_* includes renderer-specific init/deinit.
2012-07-19 01:14:17 +00:00
namespace Renderer
{
2012-08-29 18:53:53 +00:00
bool init ( int w , int h ) ;
void deinit ( ) ;
2012-07-20 01:08:29 +00:00
2013-04-12 02:59:19 +00:00
//just takes care of default font init/deinit right now
void onInit ( ) ;
void onDeinit ( ) ;
2012-07-20 01:08:29 +00:00
unsigned int getScreenWidth ( ) ;
unsigned int getScreenHeight ( ) ;
2012-07-19 16:13:27 +00:00
2012-10-17 18:21:56 +00:00
void buildGLColorArray ( GLubyte * ptr , unsigned int color , unsigned int vertCount ) ;
2012-08-02 01:43:55 +00:00
2013-06-02 19:34:50 +00:00
//graphics commands
2012-08-29 18:53:53 +00:00
void swapBuffers ( ) ;
2013-06-02 19:34:50 +00:00
void translatef ( float x , float y ) ;
void translate ( Vector2i offset ) ;
2013-06-14 15:48:13 +00:00
void pushClipRect ( int x , int y , unsigned int w , unsigned int h ) ;
void pushClipRect ( Vector2i offset , Vector2u size ) ;
void popClipRect ( ) ;
2013-06-02 22:33:49 +00:00
2012-10-17 18:21:56 +00:00
void drawRect ( int x , int y , int w , int h , unsigned int color ) ;
2012-07-19 01:14:17 +00:00
}
# endif