//-----------------------------------------------------------------------------------
// Bismillahirrahmanirrahim  
//-----------------------------------------------------------------------------------
//																					|
//               MOS 2D Engine ( MEYDANERĘ OpenGL Software Engine)					|
//																				    |
// ----------------------------------------------------------------------------------
//    Yapimci = Vedat Meydaneri														|
//     email = Chenmy1@yahoo.com													|
//     web = www.turkop.cjb.net														|
//-----------------------------------------------------------------------------------
// MOS 2D Engine (Vedat Meydaneri ) - Olusturma tarihi :10/ Temmuz /2003 saat: 15:00 |
//************************************************************************************
//************************************************************************************
//************************************************************************************
//------------------------------------------------------------------------------------  

#ifndef MOSEKRAN_H
#define MOSEKRAN_H

#include "mos2d.h"
#include "resource.h"
#include "grafik.h"

#define PEN_CLASSADI  "Window"

#define PEN_TAMEKRAN  0
#define PEN_PENCERE		1
#define PEN_SORU		2

#define PEN_TAMEKRAN_ACIK  true
#define PEN_TAMEKRAN_KAPALI false

#define PEN_AKTIF  true
#define PEN_PASIF false

#define KAPALI 0
#define ACIK 1




class MOSAPI MOSEkran
{
public:
	MOSEkran();
	virtual ~MOSEkran();
	bool Olustur(/*int a_iX, int a_iY,*/ int a_iEkranX, int a_iEkranY, int a_iEkranBPP, int a_iPencereTamEkran, const char* a_szPencereadi);
	void vKapat(void);
	bool bHandleMessages(void);
	void vBufferSwap(void);
	void Ekran2DCiz(int acikkapali);
	void EkraniTemizle();
	void Bakis3DPozisyon(float x, float y,float z);
	bool  ZamaniBaslat(void);
	float GetElapsedSeconds(void);
	float GetFPS(void);
	void ZamaniGuncelle(void);

		
	void glResizeScenep(int a_iWidth, int a_iHeight,GLdouble Fovs);
	void glResizeSceneo(int a_iWidth, int a_iHeight);


private:
		LARGE_INTEGER p_startTime;
		LARGE_INTEGER p_ticksPerSecond;
public:
	/*	HINSTANCE g_hInstance;	
HWND	  g_hWnd;			
HDC		  g_hDC;			
HGLRC	  g_hRC;*/
		
int g_EkranX;
int g_EkranY;
int g_BPP;
bool g_PencereAktif;

	GLdouble kameraFOV;
     
	float g_ZamanSayaci;
    float g_fFPS;

	bool pu_bTamekran;

	char pu_szPencereadi[256];


	
};

extern HINSTANCE g_hInstance;	
extern HWND	  g_hWnd;			
extern HDC		  g_hDC;			
extern HGLRC	  g_hRC;

extern LRESULT CALLBACK WindowProc(HWND a_hWnd, UINT a_uiMsg, WPARAM a_wParam, LPARAM a_lParam);
//------------------------------------------------------------------//
//------------------------------------------------------------------//
//- FUNCTIONS ------------------------------------------------------//
//------------------------------------------------------------------//
//------------------------------------------------------------------//


#endif