About Store Forum Documentation Contact



Post Reply 
No Copy
Author Message
djpercy Offline
Member

Post: #1
No Copy
Hello,

I copy a texture image in a image2d but the result is a black picture.
When i draw the rtt Image on the Display is all right.

PHP Code:
if(!rtt.is())
{
rtt.create(tex_sizetex_size,IMAGE_B8G8R8A8IMAGE_RT1);
 
rtt.copyTry(im,1,1,1,IMAGE_2D,1,FILTER_NONE);} 

Greetings Denis
12-03-2011 10:56 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: No Copy
Use Header Browser to read the comments for Image::copyTry. Count the number of arguments you are passing carefully, as well.
12-04-2011 06:44 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: No Copy
Also image rt does not support copying
12-04-2011 11:10 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #4
RE: No Copy
Hallo,

ok, I must find a other solution. THANKS

Greetings Denis
12-04-2011 11:28 AM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #5
RE: No Copy
Hello

Is it possible that the DrawMask not work with the image rt?

Greetings Denis
Hello,

The Copy methode not work, i think i wrote my own copy. don't work why?

PHP Code:
....
inImage.create(tex_sizetex_size,IMAGE_B8G8R8A8IMAGE_RT1)
outImage.create(512512,IMAGE_B8G8R8A8IMAGE_2D1);
....


Image &pointCopy(Image &inImage,Image &outImage)
{
      
//Image über Matrix drehen
      
signed x1 inImage.x()/2;
      
signed y1 inImage.y()/2;
      if(
inImage.lock() ) 
      {
        if(
outImage.lock() ) 
       {  
          
FREPD(yinImage.y()) 
            
FREPD(xinImage.x())
            {
                
outImage.pixel(xyinImage.pixel(x,y));
            }
        
inImage.unlock(); 
    }
      
outImage.unlock(); 
    }


    return 
outImage;

(This post was last modified: 12-05-2011 02:21 PM by djpercy.)
12-05-2011 01:25 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: No Copy
the only way to access IMAGE_RT data is to use Renderer.capture or Renderer.screenshot, very slow (not for realtime use)

IMAGE_RT can be used as 2d texture for drawing, so if you want to use it for drawing, you don't need to copy it anywhere.
IMAGE_RT alpha channel may be undefined - important
12-07-2011 11:51 AM
Find all posts by this user Quote this message in a reply
Post Reply