Click here to Skip to main content
15,890,438 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Change to /clr option Pin
Epi3-Oct-06 21:55
Epi3-Oct-06 21:55 
GeneralRe: Change to /clr option Pin
Epi4-Oct-06 4:50
Epi4-Oct-06 4:50 
QuestionShow Console + ShowDialog [modified] Pin
bankai1232-Oct-06 16:13
bankai1232-Oct-06 16:13 
AnswerRe: Show Console + ShowDialog [modified] Pin
User 5838522-Oct-06 20:47
User 5838522-Oct-06 20:47 
GeneralRe: Show Console + ShowDialog Pin
bankai1232-Oct-06 21:15
bankai1232-Oct-06 21:15 
GeneralRe: Show Console + ShowDialog Pin
User 5838522-Oct-06 21:18
User 5838522-Oct-06 21:18 
GeneralRe: Show Console + ShowDialog Pin
bankai1233-Oct-06 13:47
bankai1233-Oct-06 13:47 
Questionopengl problem Pin
Arif Liminto1-Oct-06 22:08
professionalArif Liminto1-Oct-06 22:08 
hi , i got problem with opengl why i cannot display cube and triangle in my comp... is there any code wrong below if u know plz inform me thanks;)
--------------------------------------------
#include<gl glut.h="">

float rtri; // Angle For The Triangle
float rquad; // Angle For The Quad


int InitGL(GLvoid)
{
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

}

void display (GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(-1.5f,0.0f,-6.0f);
glRotatef(rtri,0.0f,1.0f,0.0f);

glBegin(GL_TRIANGLES);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);

glColor3f(0.0f,1.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);

glColor3f(0.0f,0.0f,1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);

glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);

glColor3f(0.0f,0.0f,1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);

glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, -1.0f);

glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);

glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, -1.0f);

glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f, -1.0f);

glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);

glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);

glColor3f(0.0f,1.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glEnd();

glLoadIdentity();
glTranslatef(1.5f,0.0f,-7.0f);
glRotatef(rquad,1.0f,1.0f,1.0f);

glBegin(GL_QUADS);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);

glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);

glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);

glColor3f(1.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);

glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);

glColor3f(1.0f,0.0f,1.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glEnd();

glPopMatrix();
rtri+=0.2f;
rquad-=0.15f;

glutSwapBuffers ( );

}

void keyboard ( unsigned char key, int x, int y )
{
switch ( key ) {
case 27: // When Escape Is Pressed...
exit ( 0 ); // Exit The Program
break;
default:
break;
}
}


int main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(100,100);
glutCreateWindow("simple");
glutFullScreen ( );
glutKeyboardFunc ( keyboard );
InitGL ();
glutDisplayFunc(display);
glutMainLoop();
}
AnswerRe: opengl problem Pin
Christian Graus1-Oct-06 23:49
protectorChristian Graus1-Oct-06 23:49 
QuestionManaged C++ Winforms using MouseEnter/Leave Pin
sirokket161-Oct-06 14:54
sirokket161-Oct-06 14:54 
QuestionDevice contexts / hWnd's Pin
zzattack1-Oct-06 9:45
zzattack1-Oct-06 9:45 
AnswerRe: Device contexts / hWnd's Pin
Christian Graus1-Oct-06 10:04
protectorChristian Graus1-Oct-06 10:04 
GeneralRe: Device contexts / hWnd's Pin
zzattack1-Oct-06 10:08
zzattack1-Oct-06 10:08 
GeneralRe: Device contexts / hWnd's Pin
Christian Graus1-Oct-06 10:17
protectorChristian Graus1-Oct-06 10:17 
GeneralRe: Device contexts / hWnd's [modified] Pin
zzattack1-Oct-06 10:34
zzattack1-Oct-06 10:34 
QuestionNew To C++ Need Help ---- Buttons On Form Apps Pin
Mark_Murphy1-Oct-06 7:11
Mark_Murphy1-Oct-06 7:11 
AnswerRe: New To C++ Need Help ---- Buttons On Form Apps Pin
Christian Graus1-Oct-06 10:06
protectorChristian Graus1-Oct-06 10:06 
QuestionGetting audio signal.. Please help Pin
Commickey30-Sep-06 1:12
Commickey30-Sep-06 1:12 
AnswerRe: Getting audio signal.. Please help Pin
Christian Graus1-Oct-06 10:07
protectorChristian Graus1-Oct-06 10:07 
QuestionAuthoritative .Net 2.0 Library Development Reference? Pin
mike montagne29-Sep-06 12:33
mike montagne29-Sep-06 12:33 
QuestionDoc/View-like plugin DLLs in C++/CLI Pin
Bartosz Bien29-Sep-06 12:04
Bartosz Bien29-Sep-06 12:04 
AnswerRe: Doc/View-like plugin DLLs in C++/CLI Pin
led mike3-Oct-06 5:15
led mike3-Oct-06 5:15 
GeneralRe: Doc/View-like plugin DLLs in C++/CLI Pin
Bartosz Bien12-Oct-06 22:54
Bartosz Bien12-Oct-06 22:54 
GeneralRe: Doc/View-like plugin DLLs in C++/CLI Pin
led mike13-Oct-06 4:48
led mike13-Oct-06 4:48 
Questionautomatic installation of the cab on the pocket pc Pin
canadaeve29-Sep-06 9:54
canadaeve29-Sep-06 9:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.