Jump to content
  • Advertisement

TheSeb

Member
  • Content Count

    217
  • Joined

  • Last visited

Community Reputation

144 Neutral

About TheSeb

  • Rank
    Member
  1. i have reinstalled visual and now it works
  2. i now have these errors : tp1.c c:\program files\microsoft visual studio 8\vc\platformsdk\include\windef.h(122) : warning C4005: 'CALLBACK' : macro redefinition c:\program files\microsoft visual studio 8\vc\include\gl\gl.h(127) : see previous definition of 'CALLBACK' c:\program files\microsoft visual studio 8\vc\platformsdk\include\windef.h(123) : warning C4005: 'WINAPI' : macro redefinition c:\program files\microsoft visual studio 8\vc\include\gl\gl.h(128) : see previous definition of 'WINAPI' c:\program files\microsoft visual studio 8\vc\platformsdk\include\windef.h(125) : warning C4005: 'APIENTRY' : macro redefinition c:\program files\microsoft visual studio 8\vc\include\gl\gl.h(126) : see previous definition of 'APIENTRY' c:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h(21) : warning C4005: 'WINGDIAPI' : macro redefinition c:\program files\microsoft visual studio 8\vc\include\gl\gl.h(125) : see previous definition of 'WINGDIAPI' d:\cg\tp1lpin\tp1.c(334) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' Generating Code... Compiling manifest to resources... Linking... tp1.obj : error LNK2019: unresolved external symbol _glTexImage2D referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glTexParameteri referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glBindTexture referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glGenTextures referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glPolygonMode referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glShadeModel referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glEnable referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glClearDepth referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glClearColor referenced in function _Initialiser_GL_Cg tp1.obj : error LNK2019: unresolved external symbol _glFlush referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glEnd referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glVertex3f referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glTexCoord2f referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glBegin referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glColor3f referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glRotatef referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glTranslatef referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glLoadIdentity referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glMatrixMode referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _glClear referenced in function _Dessiner tp1.obj : error LNK2019: unresolved external symbol _gluPerspective referenced in function _ReshapeGL tp1.obj : error LNK2019: unresolved external symbol _glViewport referenced in function _ReshapeGL Debug/tp1 Cg.exe : fatal error LNK1120: 22 unresolved externals Build log was saved at "file://d:\Cg\TP1LPIN\tp1 Cg\Debug\BuildLog.htm" tp1 Cg - 23 error(s), 10 warning(s) and i have added OpenGL32.lib glut32.lib cgGL.lib cg.lib my headers are these ones : #include <GL/GL.h> #include <GL/glu.h> /* CG : la librairie cg */ /* CG : la librairie cgGL */ #include <Cg\cg.h> #include <Cg\cgGL.h> #include <stdlib.h> #include <stdio.h> #include <GL/glut.h>
  3. Hi, i have these errors with visual C++ 2005 pro : Compiling... tpCelShading.c C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\windef.h(122) : warning C4005: 'CALLBACK' : macro redefinition C:\Program Files\Microsoft Visual Studio 8\VC\include\GL/gl.h(127) : see previous definition of 'CALLBACK' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\windef.h(123) : warning C4005: 'WINAPI' : macro redefinition C:\Program Files\Microsoft Visual Studio 8\VC\include\GL/gl.h(128) : see previous definition of 'WINAPI' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\windef.h(125) : warning C4005: 'APIENTRY' : macro redefinition C:\Program Files\Microsoft Visual Studio 8\VC\include\GL/gl.h(126) : see previous definition of 'APIENTRY' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wingdi.h(21) : warning C4005: 'WINGDIAPI' : macro redefinition C:\Program Files\Microsoft Visual Studio 8\VC\include\GL/gl.h(125) : see previous definition of 'WINGDIAPI' ..\tpCelShading.c(311) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' Linking... tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGetNamedParameter referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLLoadProgram referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGetLastListing referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGetErrorString referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGetError referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgCreateProgramFromFile referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLSetOptimalOptions referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLGetLatestProfile referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgCreateContext referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glPolygonMode referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glShadeModel referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glEnable referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glClearDepth referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glClearColor referenced in function _Initialiser_GL_Cg tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgDestroyContext referenced in function _Arreter_Cg tpCelShading.obj : error LNK2019: unresolved external symbol _glutSwapBuffers@0 referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glFlush referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLDisableProfile referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glutSolidTeapot@8 referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glMaterialf referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glMaterialfv referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLSetParameter1f referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLSetParameter4fv referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLBindProgram referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLEnableProfile referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol __imp__cgGLSetStateMatrixParameter referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glRotatef referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glTranslatef referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glLoadIdentity referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glMatrixMode referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glClear referenced in function _Dessiner tpCelShading.obj : error LNK2019: unresolved external symbol _glutPostRedisplay@0 referenced in function _ReshapeGL tpCelShading.obj : error LNK2019: unresolved external symbol _gluPerspective referenced in function _ReshapeGL tpCelShading.obj : error LNK2019: unresolved external symbol _glViewport referenced in function _ReshapeGL tpCelShading.obj : error LNK2019: unresolved external symbol _glutFullScreen@0 referenced in function _Key tpCelShading.obj : error LNK2019: unresolved external symbol _glutGet@4 referenced in function _Key tpCelShading.obj : error LNK2019: unresolved external symbol _glutPositionWindow@8 referenced in function _Key tpCelShading.obj : error LNK2019: unresolved external symbol _glutReshapeWindow@8 referenced in function _Key tpCelShading.obj : error LNK2019: unresolved external symbol _glLightfv referenced in function _init_lighting tpCelShading.obj : error LNK2019: unresolved external symbol _glutMainLoop@0 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutMouseFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutMotionFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutIdleFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutDisplayFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutKeyboardFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutReshapeFunc@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutCreateWindow@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutInitDisplayMode@4 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutInitWindowSize@8 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutInitWindowPosition@8 referenced in function _main tpCelShading.obj : error LNK2019: unresolved external symbol _glutInit@8 referenced in function _main Can you help me ?
  4. TheSeb

    what are FBOs ?

    ok thanks for your links :-)
  5. Hi, Can you tell me what it is, what is it use, and how it works (in theory) ?
  6. i have read the section which you told me, but i don't see what to do in my code, i'm a little lost :-/ i tried to multiply my vertrices by the world, view and projection matrix but it seems difficult because there are colors in my vertex structure. How can i can do ?
  7. Hi, Can you help me for that ? i want to try to display a triangle. here is my wrong code : eyeVector=D3DXVECTOR3( 0.0f, 0.0f, 0.0f ); lookAtVector=D3DXVECTOR3( 0.0f, 0.0f, 1.0f ); //vertex 1 vertexData[0].x=-100.0f ; vertexData[0].y=100.0f ; vertexData[0].z=0.9f ; //vertex 2 vertexData[1].x=100.0f ; vertexData[1].y=100.0f ; vertexData[1].z=0.9f ; //vertex 3 vertexData[2].x=0.0f ; vertexData[2].y=-100.0f ; vertexData[2].z=0.9f ; can you tell me what's wrong ?
  8. TheSeb

    Setting up DirectX on Visual Studio.net

    hi, if you have installed the directX 9 SDK this operation is done for you, you have nothing to do. However if (i don't know why) the include files and lib files haven't been added in the list which you show above, you have to do that : -install the directX SDK and go in the list you show above, there you can add a directory and specify the path of the include's files (the ones from the directX sdk) -do the same for the library files and indicate the path of the "lib" directory of the SDK. tell me if you have difficulties.
  9. i have changed D3DFVF_XYZRHW by D3DFVF_XYZ but nothing appears now :-(
  10. yes i'm using D3DFVF_XYZRHW so can i do ? and why do you call it "transformed vertices" ?
  11. Hi ! I whould like to rotate my triangle but nothing happens ... First i create my matrices : void direct3dApp::makeViewMatrix() { //set the view matrix //View point is 8 units back on the Z-axis eyeVector=D3DXVECTOR3( 100.0f, 100.0f,-10.0f ); //We are looking towards the origin lookAtVector=D3DXVECTOR3( 0.0f, 0.0f, 0.0f ); //The "up" direction is the positive direction on the y-axis upVector=D3DXVECTOR3(0.0f,1.0f,0.0f); D3DXMatrixLookAtLH(&viewMatrix, &eyeVector, &lookAtVector, &upVector); myIDirect3DDevice9->SetTransform(D3DTS_VIEW,&viewMatrix); } void direct3dApp::makeProjectionMatrix() { D3DXMatrixPerspectiveFovLH(&projectionMatrix, //Result Matrix D3DX_PI/4, //Field of View, in radians. 4.0f/3.0f, //Aspect ratio 1.0f, //Near view plane 1000.0f ); //Far view plane myIDirect3DDevice9->SetTransform(D3DTS_PROJECTION, &projectionMatrix); } void direct3dApp::makeWorldMatrix() { D3DXMatrixIdentity(&worldMatrix); myIDirect3DDevice9->SetTransform(D3DTS_WORLD,&worldMatrix); } then in my rendering method, the method "transform()" performs the rotation D3DXMATRIX rotMatrix; // Set the rotation value to the matrix. D3DXMatrixRotationZ(&rotMatrix, D3DX_PI/2); D3DXMatrixMultiply(&worldMatrix,&worldMatrix,&rotMatrix); myIDirect3DDevice9->SetTransform(D3DTS_WORLD, &worldMatrix); the transform method is called just before DrawIndexedPrimitive method Do i have forgotten something ?
  12. TheSeb

    compilation problem with sdl

    here is the code's part which is indicated by visual c++ : #include <stdio.h> #include <iostream> #include <stdlib.h> #include <fstream> #include <math.h> #include <string.h> #include <glew.h> #include <glut.h> //#include <sdl.h> //#include <gl.h> //#include <glext.h> #include <SDL_image.h> using namespace std; #pragma comment( lib,"sdl.lib") #pragma comment( lib,"sdlmain.lib") #pragma comment( lib, "SDL_image.lib") #pragma comment( lib, "glew32.lib") #pragma comment( lib, "glut32.lib") int main(int argc, char *argv[]) { glutInit (&argc, argv) ; glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH) ; glutCreateWindow (argv [0]) ; glutFullScreen(); glewInit(); glClearColor(0, 0, 0, 0); glutReshapeFunc (reshape) ; glutDisplayFunc (display) ; glutMainLoop () ; return 0 ; }
  13. TheSeb

    compilation problem with sdl

    here is the code's part which is indicated by visual c++ : #include <stdio.h> #include <iostream> #include <stdlib.h> #include <fstream> #include <math.h> #include <string.h> #include <glew.h> #include <glut.h> //#include <sdl.h> //#include <gl.h> //#include <glext.h> #include <SDL_image.h> using namespace std; #pragma comment( lib,"sdl.lib") #pragma comment( lib,"sdlmain.lib") #pragma comment( lib, "SDL_image.lib") #pragma comment( lib, "glew32.lib") #pragma comment( lib, "glut32.lib") int main(int argc, char *argv[]) { glutInit (&argc, argv) ; glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH) ; glutCreateWindow (argv [0]) ; glutFullScreen(); glewInit(); glClearColor(0, 0, 0, 0); glutReshapeFunc (reshape) ; glutDisplayFunc (display) ; glutMainLoop () ; return 0 ; }
  14. Hi ! i have these errors at the compilation for my opengl/C++ program error C2601: 'SDL_main' : local function definitions are illegal and indicates the { : int main(int argc, char *argv[]) { i don't understand because i haven't changed any part of this code (if i remember well)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!