57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
#ifndef textureH
|
|
#define textureH
|
|
|
|
#include <wx/wx.h>
|
|
#include <wx/file.h>
|
|
//#include <GL/glew.h>
|
|
//#include <GL/glu.h>
|
|
#include <stdio.h>
|
|
|
|
//#include "graph_factory.h"
|
|
|
|
unsigned int glLoadBitmap(int mip,wxString filename);
|
|
unsigned int glLoadBitmap0(int mip,wxInputStream &mis,wxString ext);
|
|
|
|
/*class TMaterial : public TEmptyPoint
|
|
{ private:
|
|
protected:
|
|
unsigned int size; //размер буфера
|
|
unsigned char* data; //временный буфер для загрузки изображения
|
|
public:
|
|
RfColorRGBA ColorDiffuseRGB;
|
|
RfColorRGBA ColorAmbientRGB;
|
|
RfColorRGBA ColorSpecularRGB;
|
|
bool Lighting;
|
|
bool blend;
|
|
wxString imgpath; //название изображения
|
|
unsigned int textureid; //id загруженного изображения
|
|
|
|
TMaterial(TEmptySetPoints *parent);
|
|
virtual ~TMaterial();
|
|
void LoadS(wxInputStream *is);
|
|
void Render(){};
|
|
void Release(); //применить текстуру
|
|
void LoadImage(); //загрузить рисунок из буфера
|
|
};
|
|
//------------------------------------------------------------------------------
|
|
//фабрика материалов (для каждого города своё)
|
|
class TMaterials : public TEmptySetPoints
|
|
{
|
|
private:
|
|
protected:
|
|
public:
|
|
unsigned int fid;
|
|
TMaterials(TCity *parent);
|
|
virtual ~TMaterials();
|
|
//void Load(const wxString path);
|
|
void LoadS(wxInputStream *is);
|
|
void Render(){};
|
|
void MouseLUp(RfPointXYZ fGLMLUpXYZ);
|
|
void MouseRUp(RfPointXYZ fGLMLUpXYZ);
|
|
void MouseMove(RfPointXYZ fGLMLUpXYZ);
|
|
void OnMouseWhell(float f);
|
|
void LoadComplete();
|
|
};*/
|
|
//------------------------------------------------------------------------------
|
|
#endif
|