/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: src/skeleton/wintel32/graphics/wintel32graphicsskeleton.cpp

*/

#include "drivers/wintel32/graphics/graphics.hpp"
#include "skeleton/graphics/graphics.hpp"

void init_graphics(void *p1, void *p2)
{
	//CSGXDriverWintel32OpenGL::create();

	CDeviceFTGLFontManager::create();
	
	// This creates the font as a 'pixmap' font. This is usual in games because
	// it's the fastest way to draw text on screen. But it's more limiting than
	// OS-based font rendering which supports changes to italics, bolds, etc
	// from the same data set.
	CSGXFont *pTitleFont = CSGXFontManager::get()->registerFont("titlefont", "sgx/arial_w32", CSGXFontParams(32, CSGXFontParams::tPixmapFontType));
	CSGXFont *pFont = CSGXFontManager::get()->registerFont("mainfont", "sgx/arial_w32", CSGXFontParams(20, CSGXFontParams::tPixmapFontType));
	CSGXFontManager::get()->setCurrentFont(pFont);


	// Fonts are given alias names (such as 'mainfont') so you can switch between
	// specific styles within the game, without needing to keep hold of pFont
	// pointers. It also allows you to change the font name/style without
	// changing your code.
	CSGXFontManager::get()->setCurrentFont("mainfont");	// same thing as above

	CSGXOpenGLTextureManager::create();
	sgxDimension2i *pSize = (sgxDimension2i *)p2;
	CWin32OpenGLEngine::create("SGX: The Engine", pSize->width, pSize->height);

	CSGXDrawSurfaceManager::get()->createDisplaySurface(pSize->width, pSize->height);	// but still ignored

	CBMPParser::create();
	CTGAParser::create();

}
