Jump to content

questions about 2d graphics programming c++

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
acwclassic

acwclassic

    Newbie

  • Members
  • PipPip
  • 25 posts
Hi

got some questions regarding 2d graphic programming, about what i should learn and what i shouldent.

im currently working on a project that would need the following:
a standard window with menus, buttons, sidepanels and the other mainthings common seen in windows applications.
inside this i would have a "panel" where i can display 2d graphics easely changeable at high speed. it should be able to draw stuff like lines, circles, squeres and use rpg to color them aswell as import images. (much like the paint interface in java).

also i would like to go "mainstream" and use the stuff professional programmers use aswell, the point is to not waste my time learning something i wont have any use of later.

so far i thougth using win32 api for the mainwindow part, since i already got a minor knowledge of it, and then some external graphic libary for the "panel", i would like to go with directx here since its widely used but im not sure if its a wise choice. seems that they havent supported 2d(directdraw) since 1995 and also it migth be a lot of work for the little thing.

the mainpoint here is to get something:
widely used
that works together or possibly doing it all by itself
also this will be purely for windows systems so i dont care about portability

so what i need help with is to decide what to learn aswell resources to learn it from.

thankfull for any help or advice, even that of the offensive kind =)

#2
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Hehe neighbour (sweden :D)

I don't think 2D in directX will be a problem, but I'm not sure... Perhaps openGL?

See this article:
"2D Programming in a 3D World: Delveloping a 2D Game Engine Using DirectX 8, Direct3D"

These are the two most commonly known graphic libraries, as you probably know...

So there is a lot of tutorials and help and support and stuff for them...
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#3
acwclassic

acwclassic

    Newbie

  • Members
  • PipPip
  • 25 posts
the thing is i havent worked with any of these stuff before and i need a good guide starting from the start, covering what software i need what imports i need, not only a description about a class doing that.
i also thougth about opengl but im unsure whats easiest, and if i should use win32 together with it and if i can use them both easely.
also found 100:s of tutorials for direct3d but noone for 2d, the article you linked to surely discribes that 2d is truly possible using direct3d but not a lot to get me on my way sadly. also im not out to code the next commercial 2d game only some moving objects that interact is good for me :)

so links/sugestions to books, tutorials or code samples covering using win32 & directx that covers this aswell as the stuff i need and what to import would be great.also games like pong in directx using win32 would be gold. also still apreciate other proposals of what i should use is very apreciated:)

marwex - viking-land sounds cool :D

#4
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Hmm, I really do not know enough to help you out, but I know that using DirectX the way you want to is possible. I've seen tutorials on how to do it (or something similar) in VB...

Norway, the viking-land.. :D
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
wxWidgets provides some utilities for 2d programming and can work with OpenGL or DirectX.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
Aereshaa

Aereshaa

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 790 posts
I use the allegro game library, check out my tutorial in tutorials>C

#7
acwclassic

acwclassic

    Newbie

  • Members
  • PipPip
  • 25 posts
now decided to use opengl and found some intressting tutorials and books on the topic, but im unable to get what files i would need and how to load these to the project. anyone care to give a short explanation to what i need and how to inport it to my project in visual studios. (or maybe link to a tutorial covering this?)
thanks :)

Edited by acwclassic, 03 October 2008 - 01:02 PM.