Forum Replies Created
-
AuthorPosts
-
Perhaps one generic exception could be added in Monkey by design.
Monkey1234567891011121314151617#Import "<std>"Using std..Class Exception Extends ThrowableField message:StringMethod New(message:String)Self.message=messageEndMethod ToString:String() VirtualReturn "Exception: " + messageEndEndFunction Main()Throw New Exception("Application Started")EndWhen I run the code I get “***** Uncaught Monkey 2 Throwable *****”, do you know how can I see the message on the output log?
I thought about this one as well as well, at first I thought that it was missing due to some sort of API economy.
For example with “New” you replace the “OnLoad”, with “OnRender” you replace the “OnUpdate”.How about making a replica of “DrawImage” instead?
If you have trouble with the 3 vertices, keep 4 vertices.
The 3 + 4 vertices will have the same data however.Otherwise you can use this instead DrawPrimitives
You would have exactly the same result but send the data arrays instantly.You can study the “modules” of Monkey2 to see. For example in “libc” you can include the source files directly (header+source). In the “gles2” you include the compiled library (header+library).
Check the documentation for more info: Monkey2 > Language reference > Integration with native code
Personally, I have not tried it yet to explain how it works, but this would be the way how its done.
Let’s hope that things will go smooth.
Very interesting concept, I see nothing wrong about this. Given that nowadays we see only phones and tablets, laptops and PCs are left behind.
Continuation from this thread:
nerobot
Also, I plan to add “Clean” checkbox into Build dialog. So we can get update and rebuild results (clean+makemods=rebuild).If you are planning to do so you can check this utility I created, just in case there is something interesting in it. I thought about making it a GUI first, but in a more practical sense, people might have dozens of bat files in their systems and invoke them directly.
http://monkey2.monkey-x.com/forums/topic/monkey2-build-cleanup-utility/In general terms all of the graphics theory is based on software renderers, OpenGL allows you to have this renderer but in the difference that it exists as hardware and you are given an API to access it and use it.
Superb!
How this actually is called in Monkey? Ternary?
Good idea, I noticed this that when I tried to download a module (portmidi) there was a forceful rebuild of all the modules (I went for more snacks). Perhaps there could be a tracking of the checkbox activity in a stack, so the program knows, which module was downloaded, which was to be built.
Nice approach, this gives me lots of ideas.
From one hand I would like to see this type of functionality given out of the box in mojo. This way the majority of users would simply to download pre-made shaders made by the community and use them asap.
Imagine instead of having a blue shape for your water, to have a real crystal clear water. This would be super cool.
Another approach to this solution would be:
‘ usage example
canvas.UseShader(myCustomShader)
canvas.DrawRect …
canvas.StopUsingShader()
On canvas.monkey2 (line 1229) you would have:
Field _shader:Shader ‘ the original shader
Field _shaderCustom:Shader ‘ the custom shader
Field _useCustomShader:Bool ‘ the flag to control the custom shader usageIn Method AddDrawOp (line 1409) you would have:
If _useCustomShader _drawOp.shader=_shaderCustom Else _drawOp.shader=shaderAnother guarantee for safety is that there should be a validation mechanism that would ensure that the most essential shader attributes and uniforms (starting by the prefix mx2_) are there, this would prevent any errors.
P.S. Also in this example you posted peterigz, the “time” could become a uniform, check here my GLES code to see how the uniforms are used. The “matrix” that is used as the camera:
http://monkey2.monkey-x.com/forums/topic/monkey2-opengl-experiments/I really like this concept of graphics engine, it can give a unique look.
My experience with Monkey is to do a weekly build from source, preferably for about 5-10 minutes, until I make coffee and have some snacks. By hitting the update script (not the rebuilt) there is a chance that it will be much faster, because it will reuse any as many existing cache objects possible.
There is also MediaWiki were unity scripts are based on.
https://www.mediawiki.org/wiki/MediaWikiI don’t know which is exactly the best of the best, but it will take some time testing first to be able to tell for sure.
This looks very good for a graphics filter.
-
AuthorPosts