Search found 1914 matches

by raidho36
Sun Nov 10, 2019 11:32 am
Forum: Support and Development
Topic: Can we store 3d vertices in GPU memory?
Replies: 7
Views: 200

Re: Can we store 3d vertices in GPU memory?

You can create blank mesh and populate it with plain values. Anyway if you actually intend to use voxels, which implies absolutely massive amount of them, I suggest you store them as textures and use volumetic texture rendering, e.g. cube marching.
by raidho36
Sat Nov 09, 2019 8:11 pm
Forum: Support and Development
Topic: Glitch shader?
Replies: 2
Views: 124

Re: Glitch shader?

Shadertoy is not 3d nor uses non-standard OpenGL so you shouldn't have any problems. I indeed did not. local shader = [[ uniform vec3 iResolution; // viewport resolution (in pixels) uniform float iTime; // shader playback time (in seconds) uniform vec4 iMouse; // mouse pixel coords. xy: current (if ...
by raidho36
Sat Nov 09, 2019 7:48 pm
Forum: Support and Development
Topic: Can we store 3d vertices in GPU memory?
Replies: 7
Views: 200

Re: Can we store 3d vertices in GPU memory?

Firstly a note, unless you use those as pixels in 3d, those are not voxels, just 3d blocks - Minecraft is not voxel. Do you store your voxels as 3d cubes? If you do, you can only store geometry that's visible from the outside, which will cut down massively on amount of vertices in a typical object. ...
by raidho36
Fri Nov 08, 2019 5:37 am
Forum: Support and Development
Topic: Passing a 'self' function as a parameter
Replies: 4
Views: 193

Re: Passing a 'self' function as a parameter

This and many other interesting features are detailed in the Programming in Lua book and Lua user manual.
by raidho36
Thu Nov 07, 2019 12:06 am
Forum: Support and Development
Topic: Associating a textinput event with the keypressed event that triggered it
Replies: 2
Views: 159

Re: Associating a textinput event with the keypressed event that triggered it

Textinput exist to handle keyboard-independent text input, stuff like japanese writing. Rigging keyboard-agnostic system to a physical keyboard seems like approaching the core problem at a huge tangent. Keystrokes would produce key events immediately, whereas text input may or may not be generated b...
by raidho36
Wed Nov 06, 2019 10:38 am
Forum: Support and Development
Topic: Running Require() Multiple Times With Different Results
Replies: 8
Views: 294

Re: Running Require() Multiple Times With Different Results

Sounds like you want ECS or mixin OOP. Require works the way it does because it's specifically created to load Lua modules, obviously a module definition code doesn't need to run any more than exactly once but it probably will get fetched much more than exactly once. Somewhere along these lines ther...
by raidho36
Tue Nov 05, 2019 10:44 pm
Forum: Support and Development
Topic: Problem with hanging and reading stdout from python in threads
Replies: 10
Views: 3807

Re: Problem with hanging and reading stdout from python in threads

It might be a good idea to report this to LuaJIT mailing list.
by raidho36
Tue Nov 05, 2019 9:45 pm
Forum: Support and Development
Topic: Help With Body Contact Behavior
Replies: 7
Views: 427

Re: Help With Body Contact Behavior

Also, note that you should be especially careful with checks like x == 0 or y == -1. With floating point numbers (like collision normals) this check won't work as expected. More specifically, floating point numbers have limited number of decimal places to work with, so pretty much every math operat...
by raidho36
Tue Nov 05, 2019 9:38 pm
Forum: Support and Development
Topic: Running Require() Multiple Times With Different Results
Replies: 8
Views: 294

Re: Running Require() Multiple Times With Different Results

Are you sure you're not trying to use "require()" in place of "class.new()"? Because beyond that, I can't think of any reason to do this, and even that's pretty backwards.
by raidho36
Wed Oct 30, 2019 4:31 pm
Forum: General
Topic: how to make text clickable like a button
Replies: 2
Views: 320

Re: how to make text clickable like a button

The same way you make a button with a label, but skip the button part so it's just the label.