Mid prog font
This commit is contained in:
		| @@ -22,6 +22,10 @@ float_t BackBufferRenderTarget::getHeight() { | ||||
|  | ||||
| void BackBufferRenderTarget::setSize(float_t width, float_t height) { | ||||
|   if(this->width == width && this->height == height) return; | ||||
|    | ||||
|   // Fixes a new bug that it seems GLFW has introduced. | ||||
|   if(width == 0) width = 1; | ||||
|   if(height == 0) height = 1; | ||||
|  | ||||
|   this->width = width; | ||||
|   this->height = height; | ||||
|   | ||||
| @@ -28,6 +28,7 @@ void RenderManager::init() { | ||||
|   this->fontShader = this->shaderManager.getShader<FontShader>(this->lockFontShader); | ||||
|  | ||||
|   this->renderPipeline.init(); | ||||
|   this->fontManager.init(); | ||||
|  | ||||
|   // Prepare the initial values | ||||
|   glEnable(GL_TEXTURE_2D); | ||||
|   | ||||
| @@ -62,6 +62,14 @@ void Texture::fill(struct Color color) { | ||||
|   memoryFree(pixels); | ||||
| } | ||||
|  | ||||
| void Texture::fill(uint8_t color) { | ||||
|   uint8_t *pixels = (uint8_t *)memoryAllocate( | ||||
|     sizeof(uint8_t) * this->width * this->height | ||||
|   ); | ||||
|   this->buffer(pixels); | ||||
|   memoryFree(pixels); | ||||
| } | ||||
|  | ||||
| bool_t Texture::isReady() { | ||||
|   return this->id != -1; | ||||
| } | ||||
|   | ||||
| @@ -30,6 +30,7 @@ namespace Dawn { | ||||
|       int32_t getHeight() override; | ||||
|       void setSize(int32_t width, int32_t height, enum TextureFormat format) override; | ||||
|       void fill(struct Color) override; | ||||
|       void fill(uint8_t) override; | ||||
|       bool_t isReady() override; | ||||
|       void buffer(struct Color pixels[]) override; | ||||
|       void buffer(uint8_t pixels[]) override; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user