Jump to content
  • Advertisement

ahmed30

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About ahmed30

  • Rank
    Newbie
  1. Thanks but where i can find tutorials about texture mapping ???
  2. Hello guys... I am new to this Forum ... I am AHmed ... I am creating a game using OpenGl "glut.h" ... the game is about shooting target... and i wished to load pics in to my project. so the targets appear will be from a pic file loaded from my hard disk and can change it's position ... can some one tell me a simple code to do this.. bec. all the codes i found are hard to understand... This is my sample code that i am using in my project. not any thing else " void main (int argc, char** argv) { srand(time(0)); glutInit(&argc,argv); glutInitWindowSize(W,H); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutCreateWindow("Shooting Targets"); init(); glutDisplayFunc(display); glutMainLoop(); } //************************************************************************* // Functions Definition //************************************************************************* void init (void) { glClearColor(1.0, 1.0 , 1.0, 1.0); glColor3f(1.0, 0.0, 0.0); glPointSize(5.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D (0, W, 0, H); } //////////////////////////////////////////////////////////////////////////// void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Want to load and draw a picture in this function :)) .. glFlush(); glutSwapBuffers(); } " Thanks you all for ur time ...
  3. ahmed30

    Wish to use Texture Mapping

    heey guys ...where are you ? :S Am i asking for a something hard.. :S :S i just want to draw a picture in to my project and can change it's position Thanks
  4. ahmed30

    Try, Catch, Throw?

    the try and catch are to handle errors and exceptions and to prevent errors that crash the program such as upload an invalid file , divide by zero etc. so you put the code that you want to make sure that it contains no error in "try" , then put the solution taken in "catch ".. such as an error msg appears . Another thing to keep in mind is when you use the try and catch in a funtion , this function must throw Exception or IOException ..
  5. Hello guys... I am new to this Forum ... I am AHmed ... I am creating a game using OpenGl "glut.h" ... the game is about shooting target... and i wished to load pics in to my project. so the targets appear will be from a pic file loaded from my hard disk... can some one tell me a simple code to do this.. bec. all the codes i found are hard to understand... This is my sample code that i am using in my project. not any thing else " void main (int argc, char** argv) { srand(time(0)); glutInit(&argc,argv); glutInitWindowSize(W,H); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutCreateWindow("Shooting Targets"); init(); glutDisplayFunc(display); glutMainLoop(); } //************************************************************************* // Functions Definition //************************************************************************* void init (void) { glClearColor(1.0, 1.0 , 1.0, 1.0); glColor3f(1.0, 0.0, 0.0); glPointSize(5.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D (0, W, 0, H); } //////////////////////////////////////////////////////////////////////////// void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Want to load and draw a picture in this function :)) .. glFlush(); glutSwapBuffers(); } " Thanks you all for ur time ...
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!