ENIGMA Primitives

Posted by JoshDreamland on Dec. 5, 2007, 9:28 a.m.

That's right kiddos. Josh is on drawing functions now. Who say that coming?

<script type="text/javascript"> obj = document.getElementsByTagName('span'); ind2 = -1; for (i=0;i<obj.length;i++) { if (obj.innerHTML.indexOf("JoshDreamland's") != -1) { ind2 = obj; i = obj.length; } } if (ind2 != -1) { ind2.innerHTML = ind2.innerHTML.replace("JoshDreamland's","Josh @ Dreamland's"); } </script>

Either way, I'm here to tell you that I've finally got some OpenGL going for me. There is no GLUT. Nor will there ever be, unless I hear an elaborate explanation of why I want it. It is nothing but a library of linker errors that was not built for Dev.

So, ermyes. Anyway.

draw_primitive_begin(pr_trianglestrip); 

draw_vertex_color(0.0f,1.0f,make_color_rgb(255,0,0),1);
draw_vertex_color(0.87f,-0.5f,make_color_rgb(0,255,0),1);
draw_vertex_color(-0.87f,-0.5f,make_color_rgb(0,0,255),1);

draw_primitive_end();

That is raw ENIGMA/C++. I'm still working on coordinates. I do not understand why, but everything in openGL is 0-1. I'm working on it, never fear.

There is draw_set_color(), and draw_set_color_rgb(). Betcha can't guess which one's faster! That's… INCORRECT. The RGB one is actually faster, due to openGL's eccentricity.

But in case you are wondering how that looks in action (or if it could possibly work XD), Here you go:

<img src="http://64digits.com/users/JoshDreamland/primitives_working1.PNG">

So, what I have so far….

draw_set_color (color)

draw_set_color_rgb (red, green, blue)

make_color_rgb (red, green, blue)

color_get_red (color)

color_get_green (color)

color_get_blue (color)

draw_primitive_begin (pr_trianglestrip)

draw_vertex (x, y)

draw_vertex_color (x, y, color, 1) //That's right, alpha isn't working yet. =[ I'm getting there.

draw_primitive_end ()

Of course, Dylan has all the string functions done. ALL of them. As well as all the date/time functions. And the math functions. All of those groups he did.

I'ma finish up primitives, and learn to use textures and images. Amazing what you can do in like an hour, when you don't have GLUT holding you back.

At that, thanks for reading. I think I know what to do next, when Dylan comes online.

EDIT

Working on alpha. Added draw_clear. Added -1 = white, etc.

Interface picture:

<img src="http://64digits.com/users/JoshDreamland/ENIGMA_interface_DEC5.PNG">

THERE. For those of you who are counting the seconds.

Comments

DFortun81 16 years, 5 months ago

(FYI: If you were in charge of programming something such as this, would you want to convert all 10000+ lines of code into GLUT format?)

JoshDreamland 16 years, 5 months ago

Juju–

We are apparently not getting rid of them, or at least haven't bothered is all. You see, Dylan likes paths, and time lines aren't, or won't be, hard, I wouldn't imagine.

Well, I'll do something about GLUT as late as possible.

Also, who the fuck would want to convert all that?

Either way, Dylan, I'd like if from now on you used cross platform shit. If possible. That way, later on, we can go back and recode shit one at a time in our spare time.

Besides, you wouldn't have to recode everything. Just the buttons and some draw shit, right? O.o I mean, just change the draw functions and the buttons, everything else will be the same.

s 16 years, 5 months ago

Those pathes and timelines better not be compiled if they don't get used

Or else I will shoot you. Twice

JoshDreamland 16 years, 5 months ago

Three times if you like.

We compile bare minimum. Well, not exactly. Bare minimum libraries. You'll still get all that color shit, even if you only use one. Just for example.

T G M G 16 years, 5 months ago

So each game will ship with alot of dlls (complex games I mean)? or will it compile all the features you need into a single dll when compiling the game?

JoshDreamland 16 years, 5 months ago

Everything'll be packed right in there. Apparently C++ can do that no problem. No more need for any external Dlls. In fact, I believe we have functions to work with included files without export.

Also, Fcon–

We're gonna have our own format. If we take too much, yoyo can sue. That would be bad.

biggoron 16 years, 5 months ago

@ DF81

If I were in charge of something like this I wouldn't have used WinAPI in the first place ^_^

JoshDreamland 16 years, 5 months ago

Oh no. It starts. The IF I WERE IN CHARGE. *hides*

Who the fuck is in charge of this anyway? They need to get their asses in gear >=O

s 16 years, 5 months ago

If I was in charge of this, it would fail with a big flop and I'd laugh over a shot of rum

Except the rum would be some form of tasty juice

JoshDreamland 16 years, 5 months ago

XD