Fundamental C++ Graphics Question

Fundamental C++ Graphics Question

Post by Rob » Tue, 04 Jan 2000 04:00:00



Is it at all possible to use standard, DOS BGI graphics in Borland 5 C++?
I've gotten it to work using a C node, but then I can't use classes.  Is
there a happy medium somewhere? When I try to initialize BGI graphics in
C++, I get a "Graphics not initialized (use INITGRAPH)" error that doesnt
pop up with the C node.  Any help that can be given to a beginning
programmer would be greatly appreciated.

Rob

 
 
 

Fundamental C++ Graphics Question

Post by Peter Philipp » Mon, 17 Jan 2000 04:00:00


Rob,

I would suspect - from your description of your problem - that you have
not 'wrapped' the function prototypes of the BGI graphics header file in
the "C" declaration wrappers - to prevent name mangling by the compiler.
To give a very crude example, wrap the include statement for the
graphics header file in your source module:

extern "C" {
#include <graphics.h>

Quote:}

I recommend the above technique be used only to test to ensure your
problem disappears. Hope this guides you in the right direction to
solving the problem.

Regards,
Peter


> Is it at all possible to use standard, DOS BGI graphics in Borland 5 C++?
> I've gotten it to work using a C node, but then I can't use classes.  Is
> there a happy medium somewhere? When I try to initialize BGI graphics in
> C++, I get a "Graphics not initialized (use INITGRAPH)" error that doesnt
> pop up with the C node.  Any help that can be given to a beginning
> programmer would be greatly appreciated.

> Rob


 
 
 

1. newbie: 3d space: some rather fundamental questions

hi all,
am a 3d beginner and am looking to create a navigable space in 3d. basically
a walkthrough that the user controls with the arrow keys. i know that
exporting a max model as a vrml file can create a navigable environment
within a cortona enabled webbrowser.
1) are there any other export option for navigable spaces that do not need a
plugin?
2) are there any functions in 3d max itself (paths, cameras) that one plays
with to set the basic physics of collision, gravity? or are these physics
rigged up in another program like swift 3d etc?
3) what exactly is the definition of a walkthrough? is it a preanimated path
(in 3d max) that one can simply exports out as a .avi etc? or does it also
mean an 'explorable' space controlled with arrow keys?
4) in the latter case, where can one find tutorials online to create such a
space? all i seem to come up with is animated walkthroughs where i ahve no
directional control.

thanks,
wetbehindtheears

2. Reply to JR, Fonts help

3. Fundamental Layout Question

4. EPS with Preview from Pagemaker

5. Most fundamental question -- drawline PLEASE on X....

6. Radial interpolation - what is it?

7. FUNDAMENTALS OF COMPUTER GRAPHICS

8. Fundamentals of Interactive Computer Graphics

9. Maths library required for fundamental graphics

10. C++ graphics question...

11. lax330408@cs.com lax330408@cs.com gidget467@cs.com gidget467@cs.com lax330408@cs.com gidget467@cs.com lax330408@cs.com gidget467@cs.com

12. Newbe question: graphics in C++