Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmark ds

Posted 08 February 2014 - 01:47 PM

Try:

hdc = GetDC( WindowHandle );

 
while( Running == true )
{
	while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) )
	{
		TranslateMessage( &Messages );
		DispatchMessage( &Messages );
	}

	if( Messages.message == WM_QUIT )
	{
		Running = false;
	}
	else
	{
		DRAW_OPENGL();
		SwapBuffers( hdc );
	}
}

Your hdc was invalid, glClearColor requires floats in the range 0.0-1.0, and note PM_REMOVE in PeekMessage, and the removal of GetMessage.

 

 

 

Edit - I totally give up with the code formatting!!!


#9mark ds

Posted 08 February 2014 - 01:44 PM

Try:

hdc = GetDC( WindowHandle );

 
while( Running == true )
{


while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &Messages );


DispatchMessage( &Messages );
}


if( Messages.message == WM_QUIT )
{
Running =

false;
}


else
{
DRAW_OPENGL();
SwapBuffers( hdc );
}
}

Your hdc was invalid, glClearColor requires floats in the range 0.0-1.0, and note PM_REMOVE in PeekMessage, and the removal of GetMessage.

 

 

 

Edit - I totally give up with the code formatting!!!


#8mark ds

Posted 08 February 2014 - 01:43 PM

Try:

 

hdc = GetDC( WindowHandle );

 

 

while( Running == true )

{

 

 

while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) )

{

TranslateMessage( &Messages );

 

 

DispatchMessage( &Messages );

}

 

 

if( Messages.message == WM_QUIT )

{

Running =

 

false;

}

 

 

else

{

DRAW_OPENGL();

SwapBuffers( hdc );

}

}

Your hdc was invalid, glClearColor requires floats in the range 0.0-1.0, and note PM_REMOVE in PeekMessage, and the removal of GetMessage.

 

 

 

Edit - I totally give up with the code formatting!!!


#7mark ds

Posted 08 February 2014 - 01:42 PM

Try:

 
hdc = GetDC( 
WindowHandle );


while( Running == true )
{


while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &Messages );


DispatchMessage( &Messages );
}


if( Messages.message == WM_QUIT )
{
Running = 


false;
}
DRAW_OPENGL( 
);
SwapBuffers( 
hdc );
}

Your hdc was invalid, glClearColor requires floats in the range 0.0-1.0, and note PM_REMOVE in PeekMessage, and the removal of GetMessage.

 

 

 

Edit - I totally give up with the code formatting!!!


#6mark ds

Posted 08 February 2014 - 01:41 PM

Try:

 
hdc = GetDC( 
WindowHandle );


while( Running == true )
{


while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &Messages );


DispatchMessage( &Messages );
}


if( Messages.message == WM_QUIT )
{
Running = 


false;
}
DRAW_OPENGL( 
);
SwapBuffers( 
hdc );
}

Your hdc was invalid, glClearColor requires floats in the range 0.0-1.0, and note PM_REMOVE in PeekMessage, and the removal of GetMessage.

 

 

 


#5mark ds

Posted 08 February 2014 - 01:39 PM

Try:


hdc = GetDC( WindowHandle );


while( Running == true ) { while( PeekMessage( &Messages, NULL, 0, 0, PM_REMOVE ) ) { TranslateMessage( &Messages ); DispatchMessage( &Messages ); } if( Messages.message == WM_QUIT ) { Running = false; } else { DRAW_OPNGL(); SwapBuffers( hdc ); } }

Note the PM_REMOVE in PeekMessage, and the removal of GetMessage. Also, your hdc was invalid.

Incidently, glClearColor expects it's values in the range 0.0f-1.0f, not 0-255.


PARTNERS