mirror of https://github.com/bjornbytes/lovr.git
Fix Texture dimensions;
This commit is contained in:
parent
b05e2630dd
commit
9f43f84577
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue