opengl es 2.0 mojo equivalent
Monkey Archive Forums/Monkey Projects/opengl es 2.0 mojo equivalent
| ||
Started a side project the other day to create a 2d gl 2.0 shader mojo equivalent that I could plug into existing projects to add some extra shine. Ive managed to get working: Scissor, Viewport, Cls, ClsColor, Alpha, Color, Blend ( Alpha, Add or Multiply ) A few alterations for images, they are called Textures and can be loaded with a similar command to LoadImage. SetShader( shader ) - Sets the current shader SetTexture( texture ) - Sets the current drawing texture DrawQuad - Draws quad with x, y, w, h, uv's, angle A default shader is used to render, user implemented ones can be extended and uniforms and attributes can be fetched and updated using overridden methods allowing custom values to be passed in. At the base of the rendering is a batch that groups quads together to save on shader and texture binds. ![]() The black and white texture has a ripple shader applied and the cobble stones have a lighting dot3 shader with a light at the mouse position (looks awesome!), the other quads are using different colors and blends. I have tested on ios + html5 (safari + chrome) and everything is working so far, still need to test glfw and Android before uploading a small demo. [edit] might also write a simple gpu particle shader and add to the demo... |
| ||
Well, that's awesome :) I would love to get my hands on this. Some questions: 1) Is it just drop in the module and go or will I have to recompile trans 2) Is it an addition to mojo or a replacement (cls, ...) 3) Render to texture? |
| ||
are quads coords floats or shorts? i do a test long time ago .. and shorts are much much faster (perfect for tile-maps or so) same for UV-coords... shorts are again faster with "scaled texture coord" - instead using values between 0 and 1 / i used values between 0 and 4096 (4096 is virtual resolution - even if your texture is only 1024 px) |
| ||
Nice work NoOdle, that looks sweet! |
| ||
Very interested in this. Am hopeful of some bloom and/or blur shaders for GLFW one day :D |
| ||
Ok NoOdle, you teased us enough with your awesome project. Now give us a download link already :P |
| ||
Any news NoOdle? |