Render x/y for UI elements.
This commit is contained in:
@ -8,8 +8,6 @@
|
||||
#include "image.h"
|
||||
|
||||
void imageInit(image_t *image, texture_t *texture) {
|
||||
image->x = 0;
|
||||
image->y = 0;
|
||||
image->quad.verticeCount = -1;
|
||||
imageSetTexture(image, texture);
|
||||
}
|
||||
@ -24,8 +22,8 @@ void imageSetTexture(image_t *image, texture_t *texture) {
|
||||
quadInit(&image->quad, 0, 0,0,0,0, texture->width,texture->height,1,1);
|
||||
}
|
||||
|
||||
void imageRender(image_t *image, shader_t *shader) {
|
||||
shaderUsePosition(shader, image->x, image->y, 0, 0, 0, 0);
|
||||
void imageRender(image_t *image, shader_t *shader, float x, float y) {
|
||||
shaderUsePosition(shader, x, y, 0, 0, 0, 0);
|
||||
primitiveDraw(&image->quad, 0, -1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user