Retrogamecoding(.org) > Other Languages

CGE Sourcecode

(1/3) > >>

Mopz:
In the next NaaLaa release, CGE (Crappy Graphics Engine, used for 3D software rendering) will be completely removed. So I thought it could aswell make the source code public. I wrote all of this many, many years ago, but some of you might still find it interesting. The source code (C and ASM) come with some few, compiled, examples programs. But it's pretty much a light software version of OpenGL supporting triangle and vertex shaders.

Here's the package: http://www.naalaa.com/temp/cge.zip

DJLinux:
Really good  job.
I wrote this kind of scanline raster assembler stuff (perspective corect) end of the 80th.
Now it's history or 'retro' style :-)

If you remove it from NaaLaa standard features it should be aviable as extension for >=V5.1
Of course it has its own charm.

DJ 

DJLinux:
I wonder me that your BMP loader in NaaLaa returns the right height of the image.
CGE used this *height = Get32Bits(fptr);
Normaly or often BMP's are bootom up images and the height is a negative number like -480 for a height of 480 pixels.

By the way I study the cgm format, (found it before from your NaaLaa mesh loader code)
what is it for a tool do you used in the past to create this 3D models ?

DJ

Mopz:
While studying I made a more advanced software renderer that had perspective correct texture- and bumpmapping. It also implemented phong shading and some other weird shaders invented by my mentor (dr. Anders Hast - he's got some good papers published in computer graphics programming). But it was dreadfully slow. So after my studies I wrote CGE (Crappy Graphics Engine) that I could actually write some games with. It's not perspective correct, instead I subdivide the triangles until a certain (really stupid) criteria of perspective correctness is met. The result looks much like that of the first Playstation console. This small game was one of the first things I wrote in naalaa:

http://www.youtube.com/watch?v=KihhpDwY9-U

Regarding the BMP-format, the upsidedown thing works in CGE because its coordinate system is also upside down ;)

The CGM (Crappy Graphics Model) format is my own. It's basically a version of the Geomview OFF format that can contain bitmap data for textures. The only program that outputs such models is GLOM ... that I wrote while taking a class in "advanced" computer graphics:



But CGE can also load normal OFF files.

I figure you've got an interesting background in programming? I'd love to hear your story :) Were you an Amiga, PC or Atari follower to start with?

Aurel:
Yes joshy is a big expert for graphics stuff ,from GFABasic,GL4,freeBasic ..etc..etc

Navigation

[0] Message Index

[#] Next page

Go to full version