Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

McGrane

Member Since 08 Mar 2004
Offline Last Active May 17 2013 06:00 AM
-----

Posts I've Made

In Topic: Super slow compiling?

13 May 2013 - 05:38 PM

Have you kept an eye on the ram and cpu as your programs are running? is it possible you have a memory leak eating all of your memory up ? Bar that it could be anything, virus, hardware change, just do the usual scans and such ! - a favorite of mine is ccleaner ;)


In Topic: Simple Movement With Processing+Box2d

13 May 2013 - 05:34 PM

Hi Pedrog, 

I found it difficult to understand some of your code, just because of the language, and i only had a minute to look over it but i think the problem may be here ? 

void draw() {
  background(255); //colocamos um plano de fundo na cor branca
  box2d.step(); // a cada vez que draw fizer 1 loop,
  //sera feito um loop nas acoes da box2d
  Personagem personagem = new Personagem(20,20);
  personagem.display();
}

 

If this method is being called every frame, then personagem is being created at every frame, and is being passed x: 20 and y: 20 position. Thats if i read it right ;)


In Topic: Texture problems with vertex arrays - OpenGL

27 March 2013 - 11:34 AM

Yea, perfect, it is done like that smile.png Thanks for the help !

 

VeFjeif.png


In Topic: Texture problems with vertex arrays - OpenGL

26 March 2013 - 05:21 PM

Does OpenGL do tex coords by the order of the vertex or the order of the indices? The m_vertices is just the x and z coords of the board..

int counter = 0;
for( float z = 0.0f; z < 90.0f; z+= 10 ) {
    for( float x = 0.0f; x < 90.0f; x+= 10 ) {
	m_vertices[counter]   =    x;	
	m_vertices[counter+1] = 0.0f;	
	m_vertices[counter+2] =   -z;
	counter+=3;
    }	
}

 

and the tex coords are worked out as..

	for( int i = 0; i < m_ammountPoints; i += 12 ) {
		m_texCoords[i]   = 0.0f; m_texCoords[i+1] = 0.0f; 
		m_texCoords[i+2] = 1.0f; m_texCoords[i+3] = 0.0f;
		m_texCoords[i+4] = 1.0f; m_texCoords[i+5] = 1.0f;

		m_texCoords[i+6]  = 0.0f; m_texCoords[i+7]  = 0.0f;
		m_texCoords[i+8]  = 1.0f; m_texCoords[i+9]  = 1.0f;
		m_texCoords[i+10] = 0.0f; m_texCoords[i+11] = 1.0f;
	}

 

I understand that the order messes this up.. but from the output i was reading above - where index is the index of the point drawn, and tX being the texture X and ty being the texture Y, and it being drawn in the order..

----3

  /

1...2

then

3...2

  /

1...

I think the ordering makes sence, unless i miss understand what way its ordered :S


In Topic: C++ Array

27 February 2013 - 11:49 AM

Thanks a bunch guys ! I only logged in for a quick sec and will have a more in depth look later on when i get a chance, but from what i see theres some good reading here for me :). As far as using OpenCV, im trying to avoid it as much as possible, as im trying to learn how these work myself - Altough i am using it already for displaying from the webcam. As far as noise goes in the scene i am already converting the image to line detected shapes. So there isint too much noise as the scene is mostly black and white. But there still is bit. I was originaly thinking of setting up a quadtree for the refrence image, and then checking on sections at a time for motion - But i tought it might be wasted time. And from reading these comments, im glad i stopped to ask !

Thanks lads !


PARTNERS