Author Topic: Is there way to make graphics in [C]  (Read 3852 times)

0 Members and 1 Guest are viewing this topic.

Offline Kurisu42

  • ZX 81
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Is there way to make graphics in [C]
« on: March 08, 2008 »
Just wondering is there a way to make graphics such as 2d and 3d shapes in C, is it possible to do this without calling on functions outside the program?

sorry meant graphic libraries etc
« Last Edit: March 08, 2008 by Kurisu42 »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Is there way to make graphics in [C]
« Reply #1 on: March 08, 2008 »
As far as I know, you will need to use some graphics library such Opengl / Directx or win32 GDI.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Is there way to make graphics in [C]
« Reply #2 on: March 08, 2008 »
@Kurisu42:
Do you mean like accessing directly the graphic card ???

AFAIK, it is not possible with Windows since Windows is
a protected OS and it doesnt allow any direct access to
a hardware port.

Correct me if I am wrong  ::)
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Is there way to make graphics in [C]
« Reply #3 on: March 08, 2008 »
Not impossible but very hard to do. You have to convince windows to allow you into ring0 then you have to enter real mode, protected mode is no good. but windows doesnt just give out those priveledges to anyone. There are examples from people who wrote their own operating system that can access GFX cards directly Iv even seen an example of how to do this under Linux but no one seems to have done it for windows yet.

Challenge Trophies Won:

Offline Kurisu42

  • ZX 81
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Is there way to make graphics in [C]
« Reply #4 on: March 09, 2008 »
bah graphics libraries it is then, would any of you be able to give me a link to some good tutorials on or of the site?

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Is there way to make graphics in [C]
« Reply #5 on: March 10, 2008 »
Well, it was a pretty big ask - you're running under an OS which is controlling all the hardware and making it very easy to program for any graphics card via some standard APIs.  If you could do what you want to do you'd end up coding for every graphics card individually which would set you back to where we all were in 1995!
You've already had a pretty good link to an OpenGL framework, here's my Direct3D one
http://dbfinteractive.com/index.php?topic=1536.0.  It's C++ but I have a straight C version if you'd prefer that?

Jim
Challenge Trophies Won: