Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionData Directory in PE file format Pin
sawerr2-Oct-06 0:35
sawerr2-Oct-06 0:35 
AnswerRe: Data Directory in PE file format Pin
Stephen Hewitt2-Oct-06 0:48
Stephen Hewitt2-Oct-06 0:48 
GeneralRe: Data Directory in PE file format Pin
sawerr2-Oct-06 1:48
sawerr2-Oct-06 1:48 
GeneralRe: Data Directory in PE file format Pin
Stephen Hewitt2-Oct-06 2:01
Stephen Hewitt2-Oct-06 2:01 
Questionunicode (urghh) and base64 Pin
Waldermort1-Oct-06 23:51
Waldermort1-Oct-06 23:51 
AnswerRe: unicode (urghh) and base64 Pin
kakan2-Oct-06 3:00
professionalkakan2-Oct-06 3:00 
AnswerRe: unicode (urghh) and base64 Pin
James Brown2-Oct-06 13:30
James Brown2-Oct-06 13:30 
Questionopengl problem Pin
Arif Liminto1-Oct-06 23:07
professionalArif Liminto1-Oct-06 23:07 
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
parths2-Oct-06 16:40
parths2-Oct-06 16:40 
AnswerRe: how to use a custom dll without lnk2019 Pin
Cedric Moonen1-Oct-06 22:56
Cedric Moonen1-Oct-06 22:56 
GeneralRe: how to use a custom dll without lnk2019 Pin
baharat1-Oct-06 23:31
baharat1-Oct-06 23:31 
GeneralRe: how to use a custom dll without lnk2019 Pin
Cedric Moonen2-Oct-06 1:13
Cedric Moonen2-Oct-06 1:13 
GeneralRe: how to use a custom dll without lnk2019 Pin
toxcct2-Oct-06 2:20
toxcct2-Oct-06 2:20 
GeneralRe: how to use a custom dll without lnk2019 Pin
Waldermort2-Oct-06 2:49
Waldermort2-Oct-06 2:49 
GeneralRe: how to use a custom dll without lnk2019 Pin
toxcct2-Oct-06 2:50
toxcct2-Oct-06 2:50 
Generalbrowse dialog box [modified] Pin
zon_cpp1-Oct-06 22:16
zon_cpp1-Oct-06 22:16 
GeneralRe: browse dialog box Pin
Waldermort1-Oct-06 22:28
Waldermort1-Oct-06 22:28 
GeneralRe: browse dialog box Pin
Hamid_RT2-Oct-06 0:06
Hamid_RT2-Oct-06 0:06 
GeneralRe: browse dialog box Pin
benjymous1-Oct-06 22:48
benjymous1-Oct-06 22:48 
Questionhelp: how to see library symbols Pin
Rostfrei1-Oct-06 22:16
Rostfrei1-Oct-06 22:16 
AnswerRe: help: how to see library symbols Pin
Waldermort1-Oct-06 22:29
Waldermort1-Oct-06 22:29 
AnswerRe: help: how to see library symbols Pin
Rostfrei1-Oct-06 23:25
Rostfrei1-Oct-06 23:25 
AnswerRe: help: how to see library symbols Pin
Stephen Hewitt2-Oct-06 0:36
Stephen Hewitt2-Oct-06 0:36 
GeneralRe: help: how to see library symbols Pin
Rostfrei2-Oct-06 1:24
Rostfrei2-Oct-06 1:24 
Questionserial port communication Pin
RockyJames1-Oct-06 21:16
RockyJames1-Oct-06 21:16 

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.