Merge branch 'master' of github.com:Allanis/LibD
Conflicts: src/Main/Game.cpp
This commit is contained in:
		
						commit
						52b5113ba0
					
				| @ -88,6 +88,11 @@ | |||||||
|     <ClInclude Include="..\..\src\glx\wglext.h" /> |     <ClInclude Include="..\..\src\glx\wglext.h" /> | ||||||
|     <ClInclude Include="..\..\src\Main\Game.h" /> |     <ClInclude Include="..\..\src\Main\Game.h" /> | ||||||
|     <ClInclude Include="..\..\src\Main\GLWindow.h" /> |     <ClInclude Include="..\..\src\Main\GLWindow.h" /> | ||||||
|  |     <ClInclude Include="..\..\src\Math\FPS.h" /> | ||||||
|  |     <ClInclude Include="..\..\src\Math\MathBox.h" /> | ||||||
|  |     <ClInclude Include="..\..\src\Math\Timer.h" /> | ||||||
|  |     <ClInclude Include="..\..\src\Math\Vec2.h" /> | ||||||
|  |     <ClInclude Include="..\..\src\Sprite\Sprite.h" /> | ||||||
|     <ClInclude Include="..\..\src\Texture\Texture.h" /> |     <ClInclude Include="..\..\src\Texture\Texture.h" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
| @ -95,6 +100,10 @@ | |||||||
|     <ClCompile Include="..\..\src\Main\Game.cpp" /> |     <ClCompile Include="..\..\src\Main\Game.cpp" /> | ||||||
|     <ClCompile Include="..\..\src\Main\GLWindow.cpp" /> |     <ClCompile Include="..\..\src\Main\GLWindow.cpp" /> | ||||||
|     <ClCompile Include="..\..\src\Main\main.cpp" /> |     <ClCompile Include="..\..\src\Main\main.cpp" /> | ||||||
|  |     <ClCompile Include="..\..\src\Math\FPS.cpp" /> | ||||||
|  |     <ClCompile Include="..\..\src\Math\Timer.cpp" /> | ||||||
|  |     <ClCompile Include="..\..\src\Math\Vec2.cpp" /> | ||||||
|  |     <ClCompile Include="..\..\src\Sprite\Sprite.cpp" /> | ||||||
|     <ClCompile Include="..\..\src\Texture\Texture.cpp" /> |     <ClCompile Include="..\..\src\Texture\Texture.cpp" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||||||
|  | |||||||
| @ -13,6 +13,12 @@ | |||||||
|     <Filter Include="Texture"> |     <Filter Include="Texture"> | ||||||
|       <UniqueIdentifier>{93e01b38-0451-468e-9283-d8533feac24f}</UniqueIdentifier> |       <UniqueIdentifier>{93e01b38-0451-468e-9283-d8533feac24f}</UniqueIdentifier> | ||||||
|     </Filter> |     </Filter> | ||||||
|  |     <Filter Include="Sprite"> | ||||||
|  |       <UniqueIdentifier>{97b8d845-3714-4ef7-94b4-8ac3033675a3}</UniqueIdentifier> | ||||||
|  |     </Filter> | ||||||
|  |     <Filter Include="Math"> | ||||||
|  |       <UniqueIdentifier>{cea04fae-e026-4f1f-b2be-1accb582d0a4}</UniqueIdentifier> | ||||||
|  |     </Filter> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <ClInclude Include="..\..\src\Main\GLWindow.h"> |     <ClInclude Include="..\..\src\Main\GLWindow.h"> | ||||||
| @ -33,6 +39,21 @@ | |||||||
|     <ClInclude Include="..\..\src\Actor\Player.h"> |     <ClInclude Include="..\..\src\Actor\Player.h"> | ||||||
|       <Filter>Actor</Filter> |       <Filter>Actor</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\..\src\Sprite\Sprite.h"> | ||||||
|  |       <Filter>Sprite</Filter> | ||||||
|  |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\..\src\Math\Timer.h"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\..\src\Math\Vec2.h"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\..\src\Math\FPS.h"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\..\src\Math\MathBox.h"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClInclude> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <ClCompile Include="..\..\src\Main\main.cpp"> |     <ClCompile Include="..\..\src\Main\main.cpp"> | ||||||
| @ -50,5 +71,17 @@ | |||||||
|     <ClCompile Include="..\..\src\Actor\Player.cpp"> |     <ClCompile Include="..\..\src\Actor\Player.cpp"> | ||||||
|       <Filter>Actor</Filter> |       <Filter>Actor</Filter> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|  |     <ClCompile Include="..\..\src\Math\Timer.cpp"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClCompile> | ||||||
|  |     <ClCompile Include="..\..\src\Math\Vec2.cpp"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClCompile> | ||||||
|  |     <ClCompile Include="..\..\src\Math\FPS.cpp"> | ||||||
|  |       <Filter>Math</Filter> | ||||||
|  |     </ClCompile> | ||||||
|  |     <ClCompile Include="..\..\src\Sprite\Sprite.cpp"> | ||||||
|  |       <Filter>Sprite</Filter> | ||||||
|  |     </ClCompile> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| </Project> | </Project> | ||||||
| @ -7,6 +7,8 @@ | |||||||
| 
 | 
 | ||||||
| #include "../System/Debug.h" | #include "../System/Debug.h" | ||||||
| #include "Game.h" | #include "Game.h" | ||||||
|  | #include "../Sprite/Sprite.h" | ||||||
|  | #include "../Texture/Texture.h" | ||||||
| 
 | 
 | ||||||
| Game::Game(void) { | Game::Game(void) { | ||||||
| 	_rotationAngle = 0.0f; | 	_rotationAngle = 0.0f; | ||||||
| @ -20,6 +22,12 @@ bool Game::Init(void) { | |||||||
| 	glEnable(GL_DEPTH_TEST); | 	glEnable(GL_DEPTH_TEST); | ||||||
| 	glDepthFunc(GL_LEQUAL); | 	glDepthFunc(GL_LEQUAL); | ||||||
| 	 | 	 | ||||||
|  |   Texture* testTexture = new Texture(); | ||||||
|  |   testTexture->Load("../../Data/Img/test.png"); | ||||||
|  |    | ||||||
|  |   _testSprite = new Sprite(); | ||||||
|  |   _testSprite->SetTexture(testTexture); | ||||||
|  | 
 | ||||||
| 	// Return success.
 | 	// Return success.
 | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| @ -34,22 +42,20 @@ void Game::Prepare(float dt) { | |||||||
| 
 | 
 | ||||||
| void Game::Render(void) { | void Game::Render(void) { | ||||||
| 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | ||||||
|  | 	 | ||||||
|  |   glMatrixMode(GL_PROJECTION); | ||||||
|  |   glLoadIdentity(); | ||||||
|  |   glOrtho(0.0, 800.0, 600.0, 0.0, 0.0, 1.0); | ||||||
|  | 
 | ||||||
|  |   glMatrixMode(GL_MODELVIEW); | ||||||
|   glLoadIdentity(); |   glLoadIdentity(); | ||||||
| 	 | 	 | ||||||
| 	glRotatef(_rotationAngle, 0, 0, 1); | 	_testSprite->Draw(); | ||||||
| 	 |  | ||||||
| 	glBegin(GL_TRIANGLES); |  | ||||||
| 	  glColor4f(1.0f, 0.0f, 0.0f, 1.0f); |  | ||||||
| 		glVertex3f(-1.0f, -0.5f, -4.0f); |  | ||||||
| 		glColor4f(1.0f, 1.0f, 0.0f, 1.0f); |  | ||||||
| 		glVertex3f(1.0f, -0.5f, -4.0f); |  | ||||||
| 		glColor4f(0.0f, 0.0f, 1.0f, 1.0f); |  | ||||||
| 		glVertex3f(0.0f, 0.5f, -4.0f); |  | ||||||
| 	glEnd(); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Game::Shutdown(void) { | void Game::Shutdown(void) { | ||||||
| 
 | 	delete _testSprite->GetTexture(); | ||||||
|  |   delete _testSprite; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Game::OnResize(int width, int height) { | void Game::OnResize(int width, int height) { | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
|  | class Sprite; | ||||||
|  | 
 | ||||||
| class Game { | class Game { | ||||||
| public: | public: | ||||||
| 	Game(void); | 	Game(void); | ||||||
| @ -14,4 +16,5 @@ public: | |||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
| 	float _rotationAngle; | 	float _rotationAngle; | ||||||
|  |   Sprite* _testSprite; | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										62
									
								
								src/Sprite/Sprite.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								src/Sprite/Sprite.cpp
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | |||||||
|  | #include "Sprite.h" | ||||||
|  | #include "../Texture/Texture.h" | ||||||
|  | 
 | ||||||
|  | Sprite::Sprite() { | ||||||
|  |   texture = NULL; | ||||||
|  |   size = Vec2(0.0f, 0.0f); | ||||||
|  |   scale = Vec2(1.0f, 1.0f); | ||||||
|  |   handle = Vec2(0.0f, 0.0f); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | Sprite::~Sprite() { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Sprite::Update(float dt) { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Sprite::Draw() const { | ||||||
|  |   // Awesome artwork to describe this:
 | ||||||
|  |   // 0---------1
 | ||||||
|  |   // .         .
 | ||||||
|  |   // .         .
 | ||||||
|  |   // .         .
 | ||||||
|  |   // 3---------2
 | ||||||
|  | 
 | ||||||
|  |   Vec2 vertices[4] = { | ||||||
|  |     Vec2(handle.x, handle.y), | ||||||
|  |     Vec2(handle.x + size.x, handle.y), | ||||||
|  |     Vec2(handle.x + size.x, handle.y + size.y), | ||||||
|  |     Vec2(handle.x, handle.y + size.y), | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   Vec2 texCoords[4] = { | ||||||
|  |     Vec2(0.0f, 0.0f), | ||||||
|  |     Vec2(1.0f, 0.0f), | ||||||
|  |     Vec2(1.0f, 1.0f), | ||||||
|  |     Vec2(0.0f, 1.0f), | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   for(int i = 0; i < 4; i++){ | ||||||
|  |     vertices[i].x *= scale.x; | ||||||
|  |     vertices[i].y *= scale.y; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   glEnable(GL_TEXTURE_2D); | ||||||
|  |   BindTexture(texture->GetTexID()); | ||||||
|  | 
 | ||||||
|  |   glBegin(GL_QUADS); | ||||||
|  |   glTexCoord2fv((const GLfloat*)&texCoords[0]); | ||||||
|  |   glVertex2fv((const GLfloat*)&vertices[0]); | ||||||
|  |   glTexCoord2fv((const GLfloat*)&texCoords[1]); | ||||||
|  |   glVertex2fv((const GLfloat*)&vertices[1]); | ||||||
|  |   glTexCoord2fv((const GLfloat*)&texCoords[2]); | ||||||
|  |   glVertex2fv((const GLfloat*)&vertices[2]); | ||||||
|  |   glTexCoord2fv((const GLfloat*)&texCoords[3]); | ||||||
|  |   glVertex2fv((const GLfloat*)&vertices[3]); | ||||||
|  |   glEnd(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Sprite::SetTexture(Texture* texture) { | ||||||
|  |   this->texture = texture; | ||||||
|  |   this->size = Vec2(texture->GetWidth(), texture->GetHeight()); | ||||||
|  | } | ||||||
							
								
								
									
										34
									
								
								src/Sprite/Sprite.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								src/Sprite/Sprite.h
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | #pragma once | ||||||
|  | 
 | ||||||
|  | #include "../Math/Vec2.h" | ||||||
|  | 
 | ||||||
|  | class Texture; | ||||||
|  | 
 | ||||||
|  | class Sprite { | ||||||
|  | public: | ||||||
|  |   Sprite(); | ||||||
|  |   virtual ~Sprite(); | ||||||
|  | 
 | ||||||
|  |   virtual void Update(float dt); | ||||||
|  |   virtual void Draw() const; | ||||||
|  | 
 | ||||||
|  |   const Vec2&     GetHandle() const { return handle; } | ||||||
|  |   const Vec2&     GetSize() const { return size; } | ||||||
|  |   const Vec2&     GetScale() const { return scale; } | ||||||
|  |   float           GetRotation() const { return rotation; } | ||||||
|  |   Texture*        GetTexture() { return texture; } | ||||||
|  |   const Texture*  GetTexture() const { return texture; } | ||||||
|  | 
 | ||||||
|  |   void SetHandle(const Vec2& handle) { this->handle = handle; } | ||||||
|  |   void SetScale(const Vec2& scale) { this->scale = scale; } | ||||||
|  |   void SetRotation(float rotation) { this->rotation = rotation; } | ||||||
|  |   void SetTexture(Texture* texture); | ||||||
|  | 
 | ||||||
|  | private: | ||||||
|  |   Vec2 handle; | ||||||
|  |   Vec2 size; | ||||||
|  |   Vec2 scale; | ||||||
|  |   float rotation; | ||||||
|  |   Texture* texture; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| @ -2,11 +2,24 @@ | |||||||
| #include <iostream> | #include <iostream> | ||||||
| using namespace std; | using namespace std; | ||||||
| 
 | 
 | ||||||
|  | static GLuint boundTexture = 0; | ||||||
|  | 
 | ||||||
|  | static bool IsBGR(SDL_Surface* surf) { | ||||||
|  | #if SDL_BYTEORDER == SDL_LIL_ENDIAN | ||||||
|  |   return (surf->format->Rmask & 0x00FF0000) && | ||||||
|  |          (surf->format->Bmask & 0x000000FF); | ||||||
|  | #else | ||||||
|  |   return (surf->format->Bmask & 0xFF000000) && | ||||||
|  |          (surf->format->Rmask & 0x0000FF00); | ||||||
|  | #endif | ||||||
|  | } | ||||||
|  | 
 | ||||||
| int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips) { | int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips) { | ||||||
|   // Create a storage space for the texture.
 |   // Create a storage space for the texture.
 | ||||||
|   SDL_Surface* textureImage; |   SDL_Surface* textureImage; | ||||||
|   // Format to pass to texture generation method.
 |   // Format to pass to texture generation method.
 | ||||||
|   GLint textureFormat; |   GLint format; | ||||||
|  |   GLint internalFormat; | ||||||
| 
 | 
 | ||||||
|   // Load the image, check for errors, if it isn't found, quit.
 |   // Load the image, check for errors, if it isn't found, quit.
 | ||||||
|   textureImage = IMG_Load(filename); |   textureImage = IMG_Load(filename); | ||||||
| @ -16,11 +29,42 @@ int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips) | |||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   switch(textureImage->format->BitsPerPixel) { | ||||||
|  |   case 8: | ||||||
|  |     internalFormat = format = GL_ALPHA; | ||||||
|  |     break; | ||||||
|  |   case 16: | ||||||
|  |     internalFormat = format = GL_LUMINANCE_ALPHA; | ||||||
|  |     break; | ||||||
|  |   case 24: | ||||||
|  |     internalFormat = GL_RGB; | ||||||
|  |     if (IsBGR(textureImage)) | ||||||
|  |       format = GL_BGR_EXT; | ||||||
|  |     else | ||||||
|  |       format = GL_RGB; | ||||||
|  |     break; | ||||||
|  |   case 32: | ||||||
|  |     internalFormat = GL_RGBA; | ||||||
|  |     if (IsBGR(textureImage)) | ||||||
|  |       format = GL_BGR_EXT; | ||||||
|  |     else | ||||||
|  |       format = GL_RGBA; | ||||||
|  |     break; | ||||||
|  |   default: | ||||||
|  |     format = internalFormat = GL_NONE; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   if(internalFormat == GL_NONE || format == GL_NONE) { | ||||||
|  |     std::cerr << "Warning: invalid texture format for " << filename << std::endl; | ||||||
|  |     SDL_FreeSurface(textureImage); | ||||||
|  |     return false; | ||||||
|  |   } | ||||||
|  |    | ||||||
|   // Create the texture.
 |   // Create the texture.
 | ||||||
|   glGenTextures(1, texID); |   glGenTextures(1, texID); | ||||||
|    |    | ||||||
|   // Typical texture generation using data from the bitmap.
 |   // Typical texture generation using data from the bitmap.
 | ||||||
|   glBindTexture(GL_TEXTURE_2D, *texID); |   BindTexture(*texID); | ||||||
|    |    | ||||||
|   // Setup filtering.
 |   // Setup filtering.
 | ||||||
|   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, param); |   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, param); | ||||||
| @ -30,13 +74,13 @@ int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips) | |||||||
|   if(genMips) { |   if(genMips) { | ||||||
|     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); |     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); | ||||||
|     // Generate the textures and mipmaps.
 |     // Generate the textures and mipmaps.
 | ||||||
|     gluBuild2DMipmaps(GL_TEXTURE_2D, textureFormat, textureImage->w, |     gluBuild2DMipmaps(GL_TEXTURE_2D, internalFormat, textureImage->w, | ||||||
|                       textureImage->h, GL_RGB, GL_UNSIGNED_BYTE, |                       textureImage->h, format, GL_UNSIGNED_BYTE, | ||||||
|                       textureImage->pixels); |                       textureImage->pixels); | ||||||
|   } else { |   } else { | ||||||
|     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | ||||||
|     glTexImage2D(GL_TEXTURE_2D, 0, textureFormat, textureImage->w, |     glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, textureImage->w, | ||||||
|                       textureImage->h, 0, GL_RGB, GL_UNSIGNED_BYTE, |                       textureImage->h, 0, format, GL_UNSIGNED_BYTE, | ||||||
|                       textureImage->pixels); |                       textureImage->pixels); | ||||||
|   } |   } | ||||||
|   // Free up the memory we used.
 |   // Free up the memory we used.
 | ||||||
| @ -173,3 +217,32 @@ int WriteTGAFile(const char* filename, short int width, short int height, unsign | |||||||
|    |    | ||||||
|   return 1; |   return 1; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | void BindTexture(GLuint texID) { | ||||||
|  |   if(boundTexture != texID){ | ||||||
|  |     glBindTexture(GL_TEXTURE_2D, texID); | ||||||
|  |     boundTexture = texID; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | Texture::Texture() { | ||||||
|  |   texID = 0; | ||||||
|  |   width = 0; | ||||||
|  |   height = 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | Texture::~Texture() { | ||||||
|  |   if(texID != 0) { | ||||||
|  |     glDeleteTextures(1, &texID); | ||||||
|  |     texID = 0; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | bool Texture::Load(const char* filename) { | ||||||
|  |   if(BuildTexture(filename, &texID, GL_CLAMP, false)) { | ||||||
|  |     glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); | ||||||
|  |     glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); | ||||||
|  |     return true; | ||||||
|  |   } | ||||||
|  |   return false; | ||||||
|  | } | ||||||
|  | |||||||
| @ -23,3 +23,21 @@ typedef struct { | |||||||
| int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips); | int BuildTexture(const char* filename, GLuint* texID, GLint param, bool genMips); | ||||||
| int LoadTGAFile(const char* filename, TGAFILE* tgaFile); | int LoadTGAFile(const char* filename, TGAFILE* tgaFile); | ||||||
| int WriteTGAFile(const char* filename, short int width, short int height, unsigned char* textureData); | int WriteTGAFile(const char* filename, short int width, short int height, unsigned char* textureData); | ||||||
|  | void BindTexture(GLuint texID); | ||||||
|  | 
 | ||||||
|  | class Texture { | ||||||
|  | public: | ||||||
|  |   Texture(); | ||||||
|  |   ~Texture(); | ||||||
|  | 
 | ||||||
|  |   bool Load(const char* filename); | ||||||
|  | 
 | ||||||
|  |   GLuint  GetTexID() const { return texID; } | ||||||
|  |   int     GetWidth() const { return width; } | ||||||
|  |   int     GetHeight() const { return height; } | ||||||
|  | 
 | ||||||
|  | private: | ||||||
|  |   GLuint texID; | ||||||
|  |   int width; | ||||||
|  |   int height; | ||||||
|  | }; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rtch90
						Rtch90