Jump to content

rocksoccer

Member
  • Posts

    35
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

About rocksoccer

rocksoccer's Achievements

0

Reputation

  1. I have updated the post to include the hardware list. It seems the attachment does not support txt file. Basically, I have a 128SSD and 1TB harddisk, both are connected to the native SATA port on the motherboard. The GIGABYTE SATA2 ports are not used. I will try switching that off during the weekend, and update the result.
  2. HP says it is the problem of drivers. But I have tried almost all versions, none works.
  3. I just bought a new HP laptop. It has a built-in SD reader. Every time I put in an SD card, the drive can be found. But when I try to open the drive, OS always says that the SD card is not formatted. I follow that and format the card. But some error messages about I/O errors are shown, and formatting cannot be finished. I have installed the lastest driver version 2.0.0.6 from HP official site. The problem remains. I also tried the old version, still the same problem. I am sure the problem is not cards. I have 3 cards, all of them have the same problem as above. When I try them on USB card reader, everything is OK. All of them work in my digital camera, too. Two cards are 128MB from Panasonic, and one is 256MB from Lexar. So the problem should not be because of the size. Could any1 provide some information about this error? I use windows XP. Many Thanks
  4. I think maybe gluLookAt() could be one of the reasons that affects the speed. Because if it is in the display function, then the camera will be set every time the display is refreshed. If it is in the init function, then just set the camera by once. Right??
  5. well, with Firefox, u almost never need the anti virus!
  6. I don't know whether this is the correct section to put this. if not, sorry. I m new to OpenGL. sooooo, many stupid questions. Below is my program to draw a rotating cube, I very confused why I cannot move gluLookAt() from the display function to the initialize function! Also, it seems the program is affected significantly by the size of the displaying window. Is that caused by the place of gluLookAt? If it is in the display function, does that mean every time the cube is refreshed, the camera is repositioned? Thanks in advance! Help please! //#include <GL/glu.h> #include <GL/glut.h> //#include "glut.h" #include <math.h> #define NOMATERIAL ((Material*)0) #define DEGTORAD 57.29578 #define root2 1.414213562 //typedef enum /* GLfloat theta=0.0; GLfloat beta=0.0; GLfloat alpha=0.0;*/ //the light source GLfloat xl=-3.0; GLfloat yl=3.0; GLfloat zl=3.0; GLfloat position[3]={5.0,5.0,5.0}; GLfloat f=0.0; GLfloat g=0.0; GLfloat rotqube=0.0; GLfloat m[16]={0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0}; GLfloat vertices[][3]= {{-1.0,2.0,1.0},{-1.0,4.0,1.0}, {1.0,4.0,1.0},{1.0,2.0,1.0}, {-1.0,2.0,-1.0},{-1.0,4.0,-1.0}, {1.0,4.0,-1.0},{1.0,2.0,-1.0}, {10.0,0.0,10.0},{10.0,0.0,-10.0}, {-10.0,0.0,-10.0},{-10.0,0.0,10.0}}; GLfloat colours[][3]= {{1.0,0.0,0.0},{0.0,1.0,1.0}, {1.0,1.0,0.0},{0.0,1.0,0.0}, {0.0,0.0,1.0},{1.0,0.0,1.0}, {0.0,0.0,0.0},{0.7,0.7,0.5}}; void polygon(GLfloat colours[][3], int col, GLfloat vertices[][3], int a, int b, int c, int d) { glColor3fv(colours[col]); glBegin(GL_POLYGON); glNormal3fv(vertices[a]); glVertex3fv(vertices[a]); glNormal3fv(vertices[b]); glVertex3fv(vertices[b]); glNormal3fv(vertices[c]); glVertex3fv(vertices[c]); glNormal3fv(vertices[d]); glVertex3fv(vertices[d]); glEnd(); glFlush(); } void cube (void) { //glRotatef(rotqube,1.0,1.0,1.0); //glRotatef(rotqube,1.0,0.0,0.0); //glBegin(GL_QUADS); polygon(colours,0,vertices,0,3,2,1);//front red polygon(colours,3,vertices,2,3,7,6);//right green polygon(colours,5,vertices,3,0,4,7);//bottom polygon(colours,4,vertices,1,2,6,5);//top blue polygon(colours,1,vertices,4,5,6,7);//back polygon(colours,2,vertices,5,4,0,1);//left //glEnd(); //glFlush(); //rotqube +=0.1; } void display (void) { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt (0.0, 3.0, 10.0, 0.0, 3.0, 0.0, 0.0, 1.0, 0.0); polygon(colours,7,vertices,8,9,10,11);//ground ///rotate the cube glRotatef(rotqube,1.0,4.0,1.0); //glRotatef(rotqube,3.0,0.0,0.0); //glRotatef(rotqube,-1.0,4.0,1.0); cube(); /////////////Drawing shadow////////////////////////// /*glPushMatrix(); glPushAttrib(GL_CURRENT_BIT); glTranslatef(xl,yl,zl); glMultMatrixf(m); glTranslatef(-xl,-yl,-zl);*/ //cube_shadow(); /*glPopMatrix(); glPopAttrib();*/ //////////////////////////////////////////////////// glutSwapBuffers(); } void reshape (int w, int h) { glViewport (0, 0, (GLsizei)w, (GLsizei)h); glMatrixMode (GL_PROJECTION); glLoadIdentity (); gluPerspective (60, (GLfloat)w / (GLfloat)h, 1.0, 100.0); glMatrixMode (GL_MODELVIEW); } void myidle(void) { rotqube +=0.1;//increment the angle glutPostRedisplay(); /*Mark the normal plane of current window as needing to be redisplayed. The next iteration through glutMainLoop, the window's display callback will be called to redisplay the window's normal plane. Multiple calls to glutPostRedisplay before the next display callback opportunity generates only a single redisplay callback. glutPostRedisplay may be called within a window's display or overlay display callback to re-mark that window for redisplay.*/ } static void initialize(void) { /* point light */ GLfloat light_position[] = { 5.0, 5.0, 5.0, 1.0 }; //GLfloat light_position[] = { 0.0, 2.0, 1.0, 0.0 }; GLfloat light_diffuse[]={0.0, 0.4, 0.0, 1.0}; GLfloat light_ambient[]={1.0, 1.0, 1.0, 1.0}; GLfloat white_light[]={1.0,0.0,0.0,1.0}; GLfloat mat_ambient[] = {0.56, 0.41, 0.37, 0.0}; GLfloat mat_diffuse[] = {0.43, 0.47, 0.54, 0.0}; GLfloat mat_specular[]= {0.33, 0.33, 0.52, 0.0}; GLfloat mat_emission[]= {0.0, 0.0, 0.31, 0.0}; GLfloat shininess=50.0;// the range:0~128 glMatrixMode(GL_MODELVIEW); /*glLoadIdentity(); gluLookAt (0.0, 3.0, 10.0, 0.0, 3.0, 0.0, 0.0, 1.0, 0.0);*/ /* in the eye (viewing) coordinates*/ glLightfv(GL_LIGHT0, GL_POSITION, light_position); /* GL_LIGHT0 is a point light */ glLightfv(GL_LIGHT0, GL_DIFFUSE, white_light);//light_diffuse); glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); glLightfv(GL_LIGHT0, GL_SPECULAR, white_light); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,GL_TRUE);/* a local viewport tends to yield more realistic results. but more calculation*/ glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,GL_FALSE); /* Set the material*/ glShadeModel(GL_SMOOTH); glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); /*diffuse reflectance plays the most important role in the determining what you perceive the color of an object to be*/ /*both ambient and diffuse are not affected by the position of the viewport*/ glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); glMaterialf(GL_FRONT, GL_SHININESS, shininess); //glEnable(GL_CULL_FACE);//Backface culling glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_NORMALIZE); glEnable(GL_DEPTH_TEST);/*enable the z or depth buffer. then there is no need for enabling GL_CULL_FACE, this is a more general way to hide the back face*/ //glLoadIdentity(); glEnable(GL_COLOR_MATERIAL); //glColorMaterial(GL_FRONT, GL_LIGHT0); glColorMaterial(GL_FRONT, GL_AMBIENT); glColorMaterial(GL_FRONT, GL_AMBIENT); /*glColorMaterial specifies two independent values: the first determines which face to update, and the second determines which material property are updated*/ /*glColorMaterial(GL_FRONT, GL_SPECULAR); glColorMaterial(GL_FRONT, GL_SPECULAR); glColorMaterial(GL_FRONT, GL_SPECULAR); glColorMaterial(GL_FRONT, GL_SPECULAR);*/ glClearColor (1.0,1.0,1.0,0.0); } int main (int argc, char **argv) { glutInit (&argc, argv); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);//double buffer /*RGBA mode is used, the lighting capability is different for the RGBA and Color-Index modes. RGBA is always the preferred mode*/ //still dont understand why we need GLUT_DEPTH glutInitWindowSize (500, 500); glutInitWindowPosition (100, 100); glutCreateWindow ("rotating cube"); initialize(); glutDisplayFunc (display); glutReshapeFunc (reshape); glutIdleFunc(myidle); glutMainLoop (); return 0; }
  7. U can download an image of XP, and then use ur own key. Dont worry, this would not violate the lisence. just make sure, you download the correct version. I mean Home or Pro.
  8. why cannot i download the files? when i click on the links, then an image of nero appears. wot happened?
  9. scankurban, thanx for the guide. but it seems to be not detailed enough, at least for me to create a Chinese version, I still encountered a lot of problems!
  10. thanx for the guide, although still a little confused. i ll try it when i have time...busy with my project!!!
  11. Can any1 write something to teach people how to use Nero 7 Lite v7.5.9.0 SDK step by step? I m too new to this,,, so realy no idea how to do everything! thx a lot!
  12. why cannot I get access to ur website? any problem with your server??? why do I need to use proxy to get access ur site??? for any1 who cannot have access, try the proxy website http://www.primaryproxy.com/
  13. I'm working on Nero 7 Micro release. After that I will post a Nero 7 Lite SDK. It will include all stuff to build your own copy. To all, download links are working again. Please visit my site for more information. Thanx a ton.. I m waiting for that, as well
×
×
  • Create New...