Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
General Discussion

Graphics in C/C++

Buch
Tuesday, October 19, 2010 - 09:16
Buch's picture

I've learned programming in various languages (mainly C) but since I'm not very experienced I don't know how to make graphics in those language. The only language with which I can make graphics is Visual Basic, obviously because the graphic library is inside the language, but it's only for windows and it's not free, so I'd like to learn how to implement graphics in C or C++ language. Can somebody help me?

  • Log in or register to post comments
Clint Bellanger
joined 15 years 9 months ago
Tuesday, October 19, 2010 - 09:23
Clint Bellanger's picture

Buch, usually you'd turn to an outside library.  Two common examples for C/C++ are Allegro and SDL.

  • Log in or register to post comments
Buch
joined 14 years 10 months ago
Tuesday, October 19, 2010 - 09:27
Buch's picture

How do I get one of those libraries, and how do I make it work?


  • Log in or register to post comments
Clint Bellanger
joined 15 years 9 months ago
Tuesday, October 19, 2010 - 11:04
Clint Bellanger's picture

The respective websites for those libraries will go into more details:

http://www.libsdl.org/

http://alleg.sourceforge.net/

Setting them up for development depends largely on your development environment.  E.g. if you're working on Windows, the setup is very different if you're using MinGW versus Visual Studio.  A bit of Googling should turn up tutorials on how to get started.

  • Log in or register to post comments
Pompei2
joined 15 years 7 months ago
Monday, October 25, 2010 - 00:30
Pompei2's picture

Also, if you want to make 3D graphics you should use OpenGL and OGRE (Rendering engine). Google both of them and you'll get tons of tutorials.

  • Log in or register to post comments
creek23
joined 14 years 11 months ago
Monday, October 25, 2010 - 08:13
creek23's picture

Speaking of 3D, there's also IrrLicht. :)

got game?

  • Log in or register to post comments
Anonymous (not verified)
joined 0 sec ago
127.0.0.1
Wednesday, October 27, 2010 - 05:45

Talking about SDL, how should I put the files to make my compiler find them? I'm using MinGW

  • Log in or register to post comments
Buch
joined 14 years 10 months ago
Wednesday, October 27, 2010 - 05:46
Buch's picture

The anonymous of the previous post was me... I forgot to login before


  • Log in or register to post comments
sharavsambuu
joined 15 years 4 months ago
Wednesday, October 27, 2010 - 16:16

I recommend OpenGL+SDL combination for game dev. If you want to learn SDL, check it out http://lazyfoo.net/SDL_tutorials/index.php

 

for OpenGL,

http://www.videotutorialsrock.com/

http://nehe.gamedev.net/

 

 

  • Log in or register to post comments
Buch
joined 14 years 10 months ago
Friday, October 29, 2010 - 06:07
Buch's picture

I got MinGW Developer Studio and I set it up with SDL like said in the SDL tutorial suggested by sharavasambuu, but, when I try to compile the trial source code, i get an error message that in English should sound:

'Unable to run the specified application. libgmp-10.dll not found. A new installation of the application  might solve the problem.'

I've already installed twice both MinGW Developer Studio and MinGW, but the error is still there.

I've looked for the file libgmp-10.dll and it's inside the MinGW\bin folder. What could it be?


  • Log in or register to post comments
Buch
joined 14 years 10 months ago
Friday, October 29, 2010 - 06:13
Buch's picture

Problem solved! I found out that the library libgmp-10.dll (and some other libraries) had to be copied to another directory (the one with the cc1.exe file which showed the error message box) and now it works!


  • Log in or register to post comments