13,895,532 members

# ATL / WTL / STL

 Re: To take input for n number of arrays and print it. Richard MacCutchan10-Dec-17 6:18 Richard MacCutchan 10-Dec-17 6:18
 Re: To take input for n number of arrays and print it. Tarun Jha10-Dec-17 6:48 Tarun Jha 10-Dec-17 6:48
 Re: To take input for n number of arrays and print it. Richard MacCutchan10-Dec-17 6:52 Richard MacCutchan 10-Dec-17 6:52
 Re: To take input for n number of arrays and print it. Tarun Jha10-Dec-17 7:19 Tarun Jha 10-Dec-17 7:19
 Re: To take input for n number of arrays and print it. Member 1332249811-Dec-17 8:55 Member 13322498 11-Dec-17 8:55
 Re: To take input for n number of arrays and print it. Tarun Jha11-Dec-17 10:56 Tarun Jha 11-Dec-17 10:56
 Re: To take input for n number of arrays and print it. Tarun Jha16-Dec-17 5:41 Tarun Jha 16-Dec-17 5:41
 How do I keyboard input in OpenGL Mr. Anup Roy1-Dec-17 3:57 Mr. Anup Roy 1-Dec-17 3:57
 Hello, I am trying to solve my OpenGL pyramid project. If anyone can please help me with a code as soon as possible. I have to do when I build the code it will come black window After that perform the following task: 01. F1+r = 60' rotation(static) 02. F2+r =45' rotation(continuous x-axis) 03. CTRL+w = White 04. B = Black Thanks for your concern and help. ```#include #ifdef __APPLE__ #include #else #include #endif // all variables initialized to 1.0, meaning // the triangle will initially be white float red=1.0f, blue=1.0f, white=1.0f; // angle for rotating triangle float angle = 0.0f; void changeSize(int w, int h) { // Prevent a divide by zero, when window is too short // (you cant make a window of zero width). if (h == 0) h = 1; float ratio = w * 1.0 / h; // Use the Projection Matrix glMatrixMode(GL_PROJECTION); // Reset Matrix glLoadIdentity(); // Set the viewport to be the entire window glViewport(0, 0, w, h); // Set the correct perspective. gluPerspective(45.0f, ratio, 0.1f, 100.0f); // Get Back to the Modelview glMatrixMode(GL_MODELVIEW); } void renderScene(void) { // Clear Color and Depth Buffers glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Reset transformations glLoadIdentity(); // Set the camera gluLookAt( 0.0f, 0.0f, 10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f); glRotatef(angle, 1.0f, 1.0f, 0.0f); glColor3f(red,white,blue); glBegin(GL_TRIANGLES); //glColor3f(1.0, 1.0, 1.0); // Red glVertex3f( 0.0f, 1.0f, 0.0f); // glColor3f(1.0, 1.0, 1.0); // Green glVertex3f(-1.0f, -1.0f, 1.0f); //glColor3f(1.0, 1.0, 1.0); // Blue glVertex3f(1.0f, -1.0f, 1.0f); // Right // glColor3f(0.0, 1.0, 1.0); // Red glVertex3f(0.0f, 1.0f, 0.0f); //glColor3f(0.0, 1.0, 1.0); // Blue glVertex3f(1.0f, -1.0f, 1.0f); //glColor3f(0.0, 1.0, 1.0); // Green glVertex3f(1.0f, -1.0f, -1.0f); // Back //glColor3f(0.0, 0.5, 0.0); // Red glVertex3f(0.0f, 1.0f, 0.0f); // glColor3f(0.0, 0.5, 0.0); // Green glVertex3f(1.0f, -1.0f, -1.0f); // glColor3f(0.0, 0.5, 0.0); // Blue glVertex3f(-1.0f, -1.0f, -1.0f); // Left // glColor3f(0.6, 0.6, 0.6); // Red glVertex3f( 0.0f, 1.0f, 0.0f); // glColor3f(0.663, 0.663, 0.663); // Blue glVertex3f(-1.0f,-1.0f,-1.0f); // glColor3f(0.663, 0.663, 0.663); // Green glVertex3f(-1.0f,-1.0f, 1.0f); glEnd(); angle+=0.1f; glutSwapBuffers(); } void processNormalKeys(unsigned char key, int x, int y) { if (key == 27) exit(0); } void processSpecialKeys(int key, int x, int y) { switch(key) { if(key=='1') { angle+=10; } if(key=='0') { angle+=1; } case GLUT_KEY_F1 : red = 1.0; white = 0.0; blue = 0.0; ; break; case GLUT_KEY_F2 : red = 0.0; white = 1.0; blue = 0.0; break; case GLUT_KEY_F3 : red = 0.0; white = 0.0; blue = 1.0; break; } } int main(int argc, char **argv) { // init GLUT and create window glutInit(&argc, argv); glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); glutInitWindowPosition(100,100); glutInitWindowSize(640,480); glutCreateWindow("Lighthouse3D- GLUT Tutorial"); // register callbacks glutDisplayFunc(renderScene); glutReshapeFunc(changeSize); glutIdleFunc(renderScene); // here are the new entries glutKeyboardFunc(processNormalKeys); glutSpecialFunc(processSpecialKeys); // enter GLUT event processing cycle glutMainLoop(); return 1; }```
 How to get cpu speed and ram manufaturer C Languae? Uzair Ahmad12-Nov-17 4:56 Uzair Ahmad 12-Nov-17 4:56
 Re: How to get cpu speed and ram manufaturer C Languae? Afzaal Ahmad Zeeshan1-Dec-17 4:32 Afzaal Ahmad Zeeshan 1-Dec-17 4:32
 How to Disable open drop down yaswanthdasari24-Oct-17 21:36 yaswanthdasari 24-Oct-17 21:36
 Re: How to Disable open drop down Richard MacCutchan24-Oct-17 22:44 Richard MacCutchan 24-Oct-17 22:44
 Re: How to Disable open drop down yaswanthdasari25-Oct-17 0:38 yaswanthdasari 25-Oct-17 0:38
 Re: How to Disable open drop down Daniel Pfeffer25-Oct-17 1:11 Daniel Pfeffer 25-Oct-17 1:11
 Re: How to Disable open drop down yaswanthdasari25-Oct-17 23:50 yaswanthdasari 25-Oct-17 23:50
 How To Add a Dll TO MFC Application in visual Studio Member 1347149317-Oct-17 21:50 Member 13471493 17-Oct-17 21:50
 Re: How To Add a Dll TO MFC Application in visual Studio Richard MacCutchan17-Oct-17 21:58 Richard MacCutchan 17-Oct-17 21:58
 Re: How To Add a Dll TO MFC Application in visual Studio Member 1347149317-Oct-17 22:09 Member 13471493 17-Oct-17 22:09
 Re: How To Add a Dll TO MFC Application in visual Studio Richard MacCutchan17-Oct-17 22:12 Richard MacCutchan 17-Oct-17 22:12
 Re: How To Add a Dll TO MFC Application in visual Studio Member 1347149317-Oct-17 22:29 Member 13471493 17-Oct-17 22:29
 Re: How To Add a Dll TO MFC Application in visual Studio Richard MacCutchan17-Oct-17 22:45 Richard MacCutchan 17-Oct-17 22:45
 Re: How To Add a Dll TO MFC Application in visual Studio Jochen Arndt17-Oct-17 22:44 Jochen Arndt 17-Oct-17 22:44
 Re: How To Add a Dll TO MFC Application in visual Studio Member 1347149317-Oct-17 23:13 Member 13471493 17-Oct-17 23:13
 Re: How To Add a Dll TO MFC Application in visual Studio Jochen Arndt17-Oct-17 23:29 Jochen Arndt 17-Oct-17 23:29
 Re: How To Add a Dll TO MFC Application in visual Studio Richard MacCutchan18-Oct-17 0:16 Richard MacCutchan 18-Oct-17 0:16
 Last Visit: 19-Mar-19 8:42     Last Update: 19-Mar-19 8:42 Refresh « Prev1234567891011 Next »