Add mouse tracking, add null-texture gen function

Refactor the creation of the null-texture into a function. Used for
blitting rectangles that don't have any texture associated with it.
This commit is contained in:
2016-08-04 18:46:46 +10:00
parent aa505ed0b3
commit adb1aa83f3
3 changed files with 20 additions and 5 deletions
+9
View File
@@ -1,4 +1,6 @@
#include "Dengine/Renderer.h"
#include "Dengine/AssetManager.h"
#include "Dengine/Assets.h"
#include "Dengine/Debug.h"
#include "Dengine/Entity.h"
#include "Dengine/OpenGL.h"
@@ -138,6 +140,13 @@ INTERNAL void renderObject(Renderer *renderer, v2 pos, v2 size, v2 pivotPoint,
GL_CHECK_ERROR();
}
RenderTex renderer_createNullRenderTex(AssetManager *assetManager)
{
Texture *emptyTex = asset_getTexture(assetManager, texlist_empty);
RenderTex result = {emptyTex, V4(0, 1, 1, 0)};
return result;
}
void renderer_rect(Renderer *const renderer, v4 cameraBounds, v2 pos, v2 size,
v2 pivotPoint, f32 rotate, RenderTex renderTex, v4 color)
{