консоль и форма
например такое...
------------------------------------------
#include "stdafx.h"
#include "glut.h"
using namespace System;
void key ( unsigned char key, int x, int y )
{
if ( key == 27 || key == 'q' || key == 'Q' ) //quit requested
exit ( 0 );
}
void resize(int width,int height)
{
glViewport(0,0,width,height);
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-5,5, -5,5, 2,12);
gluLookAt( 0,0,5, 0,0,0, 0,1,0 );
glMatrixMode( GL_MODELVIEW );
}
float t=1;
void display()
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
/* remove next tree lines
* and enter your code here
*/
//glTranslated(0.01,0.01,0);
//glColor3d(1,0,0);
t+=t*0.01;
glutSolidSphere(t,15,15);
glutSwapBuffers();
}
void main()
{
glutInitWindowPosition(100,100);
glutInitWindowSize(400, 400);
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
glutCreateWindow( "GO" );
glutIdleFunc(display);
glutDisplayFunc(display);
glutReshapeFunc(resize);
glutKeyboardFunc ( key );
glEnable(GL_DEPTH_TEST); //ДЛЯ 3Д
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glutMainLoop();
}
---------------------------------------------
как это все перебросить на форму....или элемент формы???:)