maverick20

Members
  • Content count

    79
  • Joined

  • Last visited

Community Reputation

100 Neutral

About maverick20

  • Rank
    Member
  1. Line Editor

    Hi...i have just made a paint editor in which u may draw few primitives with vertices given with the mouse. The problem is that i need to erase figures when i press right click, deleting is a problem, and when i enable the grid, the grid is enabled, but how can i disable it when i press right click...plz help out...thnx... Note:I am using GLUT....
  2. How can i output Text....

    Quote:Original post by ff8 Hello , there is manyway to do this one of them is using texture to save the letters the u draw each letter w/ his texCoord UV on quad or something else for more information check nehe.gamedev.net google.com >_>; take care. Man just gimme the command for it, just a simple one, so that i just need to display the letters, change its color, and size.......thnx....
  3. HI...well just needed to know that how may i output text in a GL or GLUT window, like e.g.,, if i make a rectangle, i want to label it, how can i do that.....thnx..
  4. Hi...well i wrote a program to read a dino.dat file in OpenGL, but i m getting this error.... d:\visual studio 2005\myprojects\glut\polyline file\polyline file\polyline file.cpp(49) : error C2664: 'glutDisplayFunc' : cannot convert parameter 1 from 'void (__cdecl *)(char *)' to 'void (__cdecl *)(void)' None of the functions with this name in scope match the target type. The source code is given below: [Source] #include <windows.h> #include <gl/gl.h> #include <gl/glut.h> #include <fstream> using namespace std; void myInit(void) { glClearColor(1.0,1.0,1.0,0.0); glColor3f(0.0f,0.0f,0.0f); glPointSize(2.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,640.0,0.0,480.0); } ////////////////////////////////////////////////////////////////// void drawPolyLineFile(char *fileName) { fileName = "dino.dat"; fstream inStream; inStream.open(fileName, ios::in); // Open The File if(inStream.fail()) return; glClear(GL_COLOR_BUFFER_BIT); // Clear the screen GLint numpolys, numLines, x,y; inStream >> numpolys; // read the number of polylines for(int j = 0; j < numpolys; j++)//read each polyline { inStream>>numLines; glBegin(GL_LINE_STRIP); //draw the next polyline for (int i = 0; i < numLines; i++) { inStream >> x >> y; // read the next x, y pair glVertex2i(x,y); } glEnd(); } glFlush(); inStream.close(); } ////////////////////////////////////////////////////////////////// void main(int argc, char **argv) { glutInit(&argc, argv); //Initialize the toolkit glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);//Set display mode glutInitWindowSize(1024,768); glutInitWindowPosition(100,150); glutCreateWindow("Dino"); //Open the screen Window glutDisplayFunc(drawPolyLineFile); //Register Redraw function myInit(); glutMainLoop(); //Go into Perpetual Loop }[Source] ill appreciate the help! thnx
  5. Golden Ratio Rectangle!!!

    Quote:Original post by Jenison for every 1 of x multiply y by 1.618 done EDIT - or I should say y/x = 1.618 so y = 1.618 * x and x = y/1.618 Can i get a code snippet of it....
  6. Hi there. Actually i want to write a program for the golden ration rectangle, does anyone has the code listing of it????ill be really gratefull...thnx...
  7. Hi there....i wanted to ask that in games....which technique of AI or i should say branches of AI is mostly used....like Expert Systems, Fuzzy Logic, Deterministic Algorithms etc.....which one is more frequent generally and as well as according to the situation........thnx...
  8. Hi...actually below is a code i wrote to make a gingerbread man ...but when i execute it, it gives a blank screen....tell me what is wrong!!! thnx... [Source] #include <windows.h> #include <math.h> #include <gl/gl.h> #include <gl/glut.h> class GLintpoint { public: GLint x,y; void myDisplay(); }; void myInit(void) { glClearColor(1.0,1.0,1.0,0.0); glColor3f(0.0f,0.0f,0.0f); glPointSize(2.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,640.0,0.0,480.0); } ///////////////////////////////////////////////////////////////////// void myDisplay(void) { GLintpoint p,q; p.x = 115; p.y = 121; GLint M = 40; GLint L = 3; //int qx; //int qy; //int s; glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); for(GLint i=1;i<=640*480;i++) { q.x = M*(1+2*L)-p.y+sqrt((GLdouble)p.x-L*M); q.y = p.x; //s=px-120; //s=s*s; //s=sqrt((double)s); //qx=280-py+s; //qy=px; glVertex2i(q.x,q.y); p.x = q.x; p.y = q.y; //px=qx; //py=qy; } glEnd(); glFlush(); } //////////////////////////////////////////////////////////////////// void main(int argc, char **argv) { glutInit(&argc, argv); //Initialize the toolkit glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);//Set display mode glutInitWindowSize(640,480); glutInitWindowPosition(100,150); glutCreateWindow("GingerBread Man"); //Open the screen Window glutDisplayFunc(myDisplay); //Register Redraw function //glutReshapeFunc(myMouse); //glutMouseFunc(myMouse); //Register Mouse function myInit(); glutMainLoop(); //Go into Perpetual Loop }[Source] [Edited by - maverick20 on October 31, 2006 2:44:09 PM]
  9. Hi!!! well first of all, where can i find GLUT documentation with all the commands, and second, i have been given a case study to complete in which i just have to make a pseudorandom clouds of dots. The dots could be generated with random() function of C++ but i have to make my own RNG(Random Number Generator) for generating the dots. Any idea on how can i make my own RNG??? Thnx... and ya,, any good and easy book on openGL???
  10. About enums in C++

    Welll...i think u should use one header for it if you are writing an specific application.....
  11. SDI and MDI

    Hi...i m a user of VC++ but havent used SDI (Single Document Interface) and MDI (Multiple Document Interface). I have heard the are a part of MFC??? As an assignment, i have to make interface through SDI...Kindly tell me how to do it, and any resources that are available on MFC....thnx...
  12. Hi...did anyone use DarkBASIC professional or its other tools, if so, tell me how was the experience.....are they good...
  13. Hi...just wanted to ask that why the hell am i getting this error... ------ Build started: Project: GLUT, Configuration: Debug Win32 ------ Linking... MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup D:\Visual Studio 2005\MyProjects\OpenGL\GLUT\Debug\GLUT.exe : fatal error LNK1120: 1 unresolved externals Build log was saved at "file://d:\Visual Studio 2005\MyProjects\OpenGL\GLUT\GLUT\Debug\BuildLog.htm" GLUT - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Is there anything wrong with glut??or its paths..if it is so, please help me out and also provide a link from where i can get GLUT, the latest...or any previous versions...thnx
  14. What do these errors indicate!!!

    Quote:Original post by smitty1276 You should run it in your debugger and see where it crashes. Man, actually i wasnt getting these errors in VC++6.0, but i m getting them in VC++ 2005 Professional edition, what the hell. And do i need to add these files, i.e., dxguid.lib and d3d8.lib in the project settings, and if yes, then how may i do it....
  15. '02 Main.exe': Loaded 'D:\Visual Studio 2005\MyProjects\Game Book\Chapter_13\02 Main\Debug\02 Main.exe', Symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\d3d8.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\ntmarta.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded. '02 Main.exe': Loaded 'C:\WINDOWS\system32\samlib.dll', No symbols loaded. First-chance exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. Unhandled exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. First-chance exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. Unhandled exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. First-chance exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. Unhandled exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. First-chance exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. Unhandled exception at 0x00460697 in 02 Main.exe: 0xC0000005: Access violation reading location 0x00000018. The program '[1948] 02 Main.exe: Native' has exited with code 0 (0x0).