Fix Texture dimensions;

This commit is contained in:
bjorn 2017-01-11 18:45:01 -08:00
parent b05e2630dd
commit 9f43f84577
2 changed files with 3 additions and 11 deletions

View File

@ -55,7 +55,7 @@ CanvasState lovrTextureGetCanvasState(Texture* texture) {
CanvasState canvasState = {
.framebuffer = texture->fbo,
.viewport = { 0, 0, texture->width, texture->height },
.viewport = { 0, 0, texture->textureData->width, texture->textureData->height },
.isSystem = 0
};
@ -65,11 +65,11 @@ CanvasState lovrTextureGetCanvasState(Texture* texture) {
}
int lovrTextureGetHeight(Texture* texture) {
return texture->height;
return texture->textureData->height;
}
int lovrTextureGetWidth(Texture* texture) {
return texture->width;
return texture->textureData->width;
}
void lovrTextureGetFilter(Texture* texture, FilterMode* min, FilterMode* mag) {

View File

@ -25,19 +25,11 @@ typedef enum {
WRAP_CLAMP_ZERO = GL_CLAMP_TO_BORDER
} WrapMode;
typedef enum {
PROJECTION_ORTHOGRAPHIC,
PROJECTION_PERSPECTIVE
} ProjectionType;
typedef struct {
Ref ref;
TextureData* textureData;
GLuint id;
GLuint fbo;
ProjectionType projectionType;
int width;
int height;
FilterMode filterMin;
FilterMode filterMag;
WrapMode wrapHorizontal;