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 - max_vodoo

Pages: [1]
1
Graphics / Re: RGB image pixels
« on: April 02, 2012, 01:35:45 am »
use some thing like this
void  ToRGBA(unsigned char * frame,unsigned char * RGBA,int width,int height)
{
   int count=0;
   int count2=0;
    while(count2<width*height*3)
    {
       RGBA[count]=frame[count2];
       RGBA[count+1]=frame[count2+1];
       RGBA[count+2]=frame[count2+2];
       RGBA[count+3]=255;
       count+=4;
       count2+=3;
      


    }


}
hope that helps

2
Graphics / sfml 2.0 texture
« on: April 01, 2012, 11:56:16 am »
dose sfml 2.0 support to load raw data from the memory,cuz every time i try to load data from memory
i get this error "Failed to load image from memory"

ToRGBA(v.getPixels(1,true,true),ar,320,240);// get frame from webcam videoinput.lib and convert it to rgba
t.loadFromMemory(&ar,320*240*4); //t is sf::Texture;
t.bind();
s.setTexture(t);//s is sf::Sprite
App->draw(s);

but in sfml 1.6 sf::Image load the raw data from the memory and display it .

my second question which is not important can i load the data from the memory in the rgb format directly ?

3
Window / Re: sfml and regsvr32
« on: April 01, 2012, 02:04:27 am »
solved!!..
I was using sfml 1.6 but sfml 2.0 works fine thnx for the no help  ;)

4
Window / sfml and regsvr32
« on: March 31, 2012, 04:25:52 am »
i'am trying to create an activex control that uses sfml to create opengl window ,the project compiles fine but when i try to resgister it it get stuck somewhere and never register, but when i use sdl it register fine and works.
but i dont want to use sdl ,is there away around it
when i attach the debugger it freezes here

Context::Context()
{
    myDummyWindow = priv::WindowImpl::New();
}
any help plz

Pages: [1]