diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-28 20:57:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-28 20:57:06 +0400 |
commit | ed77c356fc1c323cef306fef2e7af03fd67a6871 (patch) | |
tree | bf7c31d131d6fc65030c3bcf9940469c8450813e /source/blender/gpu/GPU_extensions.h | |
parent | 7627a742ab6e630522186b04a71fa40533d87db2 (diff) |
Fix: OpenGL renders on graphics cards which do not support non-power-of-two
textures were stretched and the wrong size.
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 965f317aa50..3fff79390e3 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -136,7 +136,7 @@ int GPU_texture_opengl_bindcode(GPUTexture *tex); GPUFrameBuffer *GPU_framebuffer_create(void); int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, char err_out[256]); void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex); -void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex); +void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex, int w, int h); void GPU_framebuffer_texture_unbind(GPUFrameBuffer *fb, GPUTexture *tex); void GPU_framebuffer_free(GPUFrameBuffer *fb); @@ -146,10 +146,11 @@ void GPU_framebuffer_restore(void); - wrapper around framebuffer and texture for simple offscreen drawing - changes size if graphics card can't support it */ -GPUOffScreen *GPU_offscreen_create(int *width, int *height, char err_out[256]); +GPUOffScreen *GPU_offscreen_create(int width, int height, char err_out[256]); void GPU_offscreen_free(GPUOffScreen *ofs); void GPU_offscreen_bind(GPUOffScreen *ofs); void GPU_offscreen_unbind(GPUOffScreen *ofs); +void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels); /* GPU Shader - only for fragment shaders now |