Hi,
I have the following piece of code (edited from the real thing for
simplicity)
function testpipeline
screenRect=SCREEN('Rect',0);
window=SCREEN(0, 'OpenWindow', [127 127 127],
screenRect,32,2,0,0,kPsychNeedFastBackingStore);
pixRect=[0 0 300 300];
back_text=repmat(192,pixRect(4),pixRect(3));
backg=SCREEN('MakeTexture',window,back_text);
pic_text=repmat(160,pixRect(4),pixRect(3));
pic=SCREEN('MakeTexture',window,pic_text);
SCREEN('DrawTexture',backg,pic);
SCREEN('DrawTexture',window,backg);
SCREEN('Flip',window);
SCREEN('Flip',window,getsecs+10);
SCREEN('Closeall');
end
When I run this I get the following error
PTB-ERROR: Failed to setup internal framebuffer objects color buffer
attachment for imaging pipeline!
PTB-ERROR: Exact reason for failure is unknown,
glCheckFramebufferStatus() returns code 36054
PTB-ERROR: You may want to retry with the lowest acceptable (for your
study) size and depth of the onscreen window or offscreen window.
INTERNAL PSYCHTOOLBOX ERROR
error: PsychError_internal
general description: Unspecified error, probably a Psychtoolbox bug
specific description: Preparation of drawing into an offscreen window
or texture failed when trying to create associated framebuffer object!
module name: Screen
subfunction call: DrawTexture
file name: Common\Screen\PsychImagingPipelineSupport.c
function name: UNKNOWN
line number: 1075
??? (null)
Error in ==> testpipeline at 14
SCREEN('DrawTexture',backg,pic);
If I change the code to not use the imaging pipeline then the code
executes without error although I'm not sure it does what I am
expecting and I need the imaging pipeline to use dontclear=1 in flip
due to limitations of my graphics card.
I realise that what I'm doing is to draw one texture into another - is
this something that should be possible?
In reality what I'm trying to do to take an image (re-scale it) and
put it into a texture. I tried using putimage but I get an error: Put
Image does not yet support indexed mode which I presume means you
can't putimage into a texture.
Interestingly if instead of using MakeTexture I use
OpenOffScreenWindow (which I thought in PTB the two were virtually
equivalent) to construct backg and then use putimage then the code
works OK.
So what is the difference between an OffScreen Window and a texture in
PTB3 and is there a better way of achieving what I'm trying to do.
Many thanks,
Matthew.
I have the following piece of code (edited from the real thing for
simplicity)
function testpipeline
screenRect=SCREEN('Rect',0);
window=SCREEN(0, 'OpenWindow', [127 127 127],
screenRect,32,2,0,0,kPsychNeedFastBackingStore);
pixRect=[0 0 300 300];
back_text=repmat(192,pixRect(4),pixRect(3));
backg=SCREEN('MakeTexture',window,back_text);
pic_text=repmat(160,pixRect(4),pixRect(3));
pic=SCREEN('MakeTexture',window,pic_text);
SCREEN('DrawTexture',backg,pic);
SCREEN('DrawTexture',window,backg);
SCREEN('Flip',window);
SCREEN('Flip',window,getsecs+10);
SCREEN('Closeall');
end
When I run this I get the following error
PTB-ERROR: Failed to setup internal framebuffer objects color buffer
attachment for imaging pipeline!
PTB-ERROR: Exact reason for failure is unknown,
glCheckFramebufferStatus() returns code 36054
PTB-ERROR: You may want to retry with the lowest acceptable (for your
study) size and depth of the onscreen window or offscreen window.
INTERNAL PSYCHTOOLBOX ERROR
error: PsychError_internal
general description: Unspecified error, probably a Psychtoolbox bug
specific description: Preparation of drawing into an offscreen window
or texture failed when trying to create associated framebuffer object!
module name: Screen
subfunction call: DrawTexture
file name: Common\Screen\PsychImagingPipelineSupport.c
function name: UNKNOWN
line number: 1075
??? (null)
Error in ==> testpipeline at 14
SCREEN('DrawTexture',backg,pic);
If I change the code to not use the imaging pipeline then the code
executes without error although I'm not sure it does what I am
expecting and I need the imaging pipeline to use dontclear=1 in flip
due to limitations of my graphics card.
I realise that what I'm doing is to draw one texture into another - is
this something that should be possible?
In reality what I'm trying to do to take an image (re-scale it) and
put it into a texture. I tried using putimage but I get an error: Put
Image does not yet support indexed mode which I presume means you
can't putimage into a texture.
Interestingly if instead of using MakeTexture I use
OpenOffScreenWindow (which I thought in PTB the two were virtually
equivalent) to construct backg and then use putimage then the code
works OK.
So what is the difference between an OffScreen Window and a texture in
PTB3 and is there a better way of achieving what I'm trying to do.
Many thanks,
Matthew.