Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - takercena

Pages: [1]
1
Graphics / Re: Shape setposition
« on: June 14, 2012, 05:02:56 am »
Thank you.

2
Graphics / Shape setposition
« on: June 08, 2012, 06:23:52 am »
I read somewhere in this forum that setposition is returning an absolute coordinate. Is there any way to make it so when I set a circle origin (setPosition) at 0,0, only the last quarter of the circle is viewed on the window?

3
Graphics / Re: RenderTexture Updating Every Frame Rescale
« on: April 13, 2012, 12:22:58 am »
It just my naive implementation of OOP.

5
Graphics / Re: RenderTexture Updating Every Frame Rescale
« on: April 12, 2012, 05:51:10 pm »
Update is just an update once each frame (new data) is available and ready to be processed. If there is new data available, the color is retrieved using getRGBA(). http://openni.org/docs2/Tutorial/conc_updating_data.html

6
Graphics / Re: RenderTexture Updating Every Frame Rescale
« on: April 12, 2012, 05:07:42 pm »
The method is actually return XnRGB24Pixel (OpenNI). Since SFML won't accept RGB, I have to convert it to RGBA first before updating the texture.

7
Graphics / Re: RenderTexture Updating Every Frame Rescale
« on: April 12, 2012, 03:46:22 pm »
Code: [Select]
      customTexture.create(640, 480);
    window.create(sf::VideoMode(1366, 768, 32), "Rendering Camera", sf::Style::Default, windowSetting);
window.setActive();
customTexture.setSmooth(true);
customSprite.setTexture(customTexture);
customSprite.scale(2.13f,1.6f);   
     while(window.isOpen())
{
while(window.pollEvent(evt))
{
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{ window.close(); exit(1);}
if(evt.type = sf::Event::Closed)
window.close();
}
newCam->Update();
for(long int i = 0; i < 640*480; i++)
{
wRGBA[i].r = (unsigned char)newCam->getRGBA(i, 'r');
wRGBA[i].g = (unsigned char)newCam->getRGBA(i, 'g');
wRGBA[i].b = (unsigned char)newCam->getRGBA(i, 'b');
wRGBA[i].a = 255;
}

pixels = (sf::Uint8*)(wRGBA);
customTexture.update(pixels);
window.draw(customSprite);
window.display();
}

8
Graphics / Re: RenderTexture Updating Every Frame Rescale
« on: April 12, 2012, 03:11:48 pm »
Depends on what you do exactly, which we have no idea about.

The way I do it is first, in a loop, I am getting a RGBA feed from camera. Then, I am converting every pixels of one frame, update it to sf:texture(pixels) and finally draw it to window. Is this a correct way?

Is there any other method to perform anti aliasing that you can suggest?

9
Graphics / RenderTexture Updating Every Frame Rescale
« on: April 12, 2012, 04:15:15 am »
I am using rendertexture to stream pixels that are 30 fps. I am following this tutorial
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Texture.php#details

However, when I rescale it to higher view area from 640*480 to 1366 * 768, the video is very lag. How to solve this problem?

Second, how to perform anti aliasing on rendertexture?

10
Graphics / RGB image pixels
« on: March 21, 2012, 07:27:33 am »
Hello, how do I convert RGB to RGBA pixels for texture initialization?

Pages: [1]
anything