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

a2h 17 years, 1 month ago

Sweet, but yeah, the checkboxes seriously need to be redone (why not just implement the normal Windows GUI ones? Geez)

And Saudio? Are you actually implementing it into ENIGMA?

Anyway, otherwise things look good. Also… "0.0f" = ?

JoshDreamland 17 years, 1 month ago

We're cooking with gas now.

Alpha works.

On to sprites.

Polystyrene Man 17 years, 1 month ago

How are objects coming along? [:P]

JoshDreamland 17 years, 1 month ago

Like a real fucker. I'm giving them thought in between my additions to the draw functions, and I am pleased to say I'm developing some plans.

However, the system will be sketchy. Luckily ENIGMA language will look high level enough that we can hold the insides together with gum and paper clips.

JoshDreamland 17 years, 1 month ago

Just to let you all know.

pr_linelist (list of lines drawn as listed)

pr_linestrip (connected lines)

pr_pointlist (list of points drawn as listed)

pr_trianglefan (triangles fanning from center point)

pr_trianglelist (list of triangles drawn as listed)

pr_trianglestrip (connected triangles, forming tape like things)

Not GML based:

pr_lineloop (trianglefan, with lines)

pr_quadlist (trianglelist, with quads)

pr_quadstrip (trianglestrip, with quads)

pr_polygon (all points drawn as single convex polygon)

s 17 years, 1 month ago

pr_maek_3d_shiz

beam 17 years, 1 month ago

that looks suspiciously like game maker >:(

biggoron 17 years, 1 month ago

GLUT isn't a piece of shit! You take that back :O

Juju 17 years, 1 month ago

Just because I was ignored: Why does the ENIGMA toolbar buttons include all the random shit you said you were getting rid of? Like paths and timelines.

PY 17 years, 1 month ago

Becuase they couldn't be bothered to get rid of them.

@Big, I'll take J@Ds word for it, it's shit.

Also, yay!