Renderer Away!

Esoterica is… esoteric.  The BanateCore has the makings of some very rudimentary rendering, as shown with the ASCII triangles of the last post.  This time around, I wanted to actually render something that could be displayed as graphic.  So, this images shows using the exact same render, but just changing the type of the frame buffer:

local window = FixedArray2D(captureWidth, captureHeight, "pixel_BGRA_b")

Then, when I want to actually get it displayed, I copy it to a texture object, which is then rendered into the GL based window:

screenTexture:Render(0,0,winWidth, winHeight)

That’s a pretty straight forward meeting of these two technologies.  The renderer renders, and the texture object displays.  This is pretty much how things happen in the Windows environment these days.  All rendering goes to offscreen surfaces, which are then composited onto the screen using DirectX.  In my case it’s OpenGL, but same idea.  The same tricks could be applied as well.  Multiple images can be composited, employing GLSL shaders to do some fancy stuff.  Similarly, since the graphics are now capable of being on a texture object, that texture object can be mapped to any manner of other 3D object…

And so it goes.  The graphics pieces are slowly but surely being picked up off the floor and fit back together.  I’ll need to add text rendering back in, and that’s actually quite a task.  That, plus some extras such as gradient fills, bitmap copies (already available), and polygon triangulation, and the 2D graphics sub-system is complete.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s