Jump to content
  • Advertisement

tokaplan

Member
  • Content Count

    155
  • Joined

  • Last visited

Community Reputation

122 Neutral

About tokaplan

  • Rank
    Member
  1. tokaplan

    Texture jittering in the distance

    Looked into anisotropic filtering today, helps a little, but still jittering is present.
  2. tokaplan

    Texture jittering in the distance

    Well, it's a 4096x4096 render target, and I can't afford lower resolution. As simple as that ;)
  3. Hi everyone, I've recently encountered an artifact while rendering a terrain. Terrain texture pixels which are farther from the camera seem to "jitter" when the camera is moving. This artifact doesn't manifest itself if the texture is mip-mapped, so that lower resolution versions of it are used in the distance, but that takes way too much video memory since the texture is pretty big. The reason behind this seems to be quite understandable, still I see no way to work around this without going back to mip-mapping (which I can't do). Any suggestions are greatly appreciated. Thank you
  4. tokaplan

    Lua QDE debugging

    Hey everyone, I'm currently trying to get QDE debugger to work. For certain reasons QDE suites my needs perfectly, but it's debugger is the only one I've tried that doesn't work ;) The process described in Help section seems to be trivial: 1. Initialize debug client from the code (the function call returns success code) 2. Connect debug client to the server (the function call returns success code, QDE IDE prints "Client connected" message) 3. Load and execute Lua scripts from code, breakpoints are supposed to be hit (breakpoints are never hit, the execution is never broken). Anybody's using QDE debugger? Please respond. Thank you
  5. tokaplan

    Lua hesitations

    ddn3, thanks a lot, the editors you suggested are all great. I guess they are doing all they can, still I see no way I can automatically create an auto-complete file; QDE, for instance, wants it this way: void ClassName:methodName( parameters ) I guess the only way to get a real auto-complete is to make a Lua IDE parse C++ headers. Maybe I'll find an IDE that does that ;) Otherwise all we can do is browse C++ headers manually. Debugging is great though. Thank you.
  6. tokaplan

    Lua hesitations

    I'm sorry I wrote "syntax highlighting", I meant auto-complete :)
  7. tokaplan

    Lua hesitations

    Hi everyone, I'm new to scripting, so I've been doing some pondering lately. SWIG seems to work just fine as a bridge between C++ and Lua, so I'm seriously considering writing the whole business logic in Lua. The way I see it, there are two major advantages of using a script in this context: - you don't have to recompile and rerun project to see result!!! - you don't have to expose the source of the engine to everyone involved in development. But when I imagine implementing the ENTIRE business logic code in Lua, I get a little scared, since - there's no syntax highlighting, so I have to browse through C++ class definitions to remember the name of the method I'm about to call!!! - there's no decent debugging of Lua script - there's no way to dereference a pointer to C++ type, so certain steps are necessary to avoid such situations - manual instantiation of every template implementation is a little tiresome I don't really care for the last two, but the first two points I've mentioned bother me a lot. So I though maybe some of you more experienced developers could share your thoughts on this. There's probably a lot I don't know. Thank you
  8. tokaplan

    C++ pointers in Lua

    Still no luck. There must be a way to register a pointer just the way an object itself is registered through metatable...
  9. tokaplan

    C++ pointers in Lua

    Exactly, so the question is how do I tell Swig to generate metatables for Tile* as well as for Tile.
  10. tokaplan

    C++ pointers in Lua

    Hey there, Given the following C++ classes class Tile { string GetName(); }; class Terrain { Tile* GetTile( int i, int j ); } I've generated a Swig wrapper for Tile and Terrain. Now I pass a Terrain object into the lua script: function doSomething( terrain ) tile = terrain:GetTile( 1, 2 ) tile:GetName() //runtime error ebd The first line works just fine, and tile now stores a pointer to a Tile object. The second line produces a runtime error "attempt to index global 'tile' (a userdata value)". I'm thinking this is the consequence of the fact that tile stores a pointer to Tile, not Tile itself. Obviously, there's no way I can dereference a C++ pointer inside Lua script. In my real situation I MUST return Tile* from Terrain::GetTile (and not Tile itself) since Tile is abstract and can only be returned as a pointer. When passing a pointer to Lua script I can overcome this problem by using Swig's SWIG_NewPointerObj, which allows me to do the stuff I want, so the following works fine: function func( pObj ) pObj:SomeMethod() end Where pObj is a pointer to some type So, the question is: is there any way to call a method on a pointer inside Lua script? Is there any workaround for the problem I've described? Thank you
  11. tokaplan

    Lua: require vs. module

    NOW I understand how it's working ;) Thanks a lot.
  12. tokaplan

    Lua: require vs. module

    Well, it looks like I'm gonna have to bother your guys with a little bit more details ;) So, all I'm trying to do is call a function processEvent2 which is declared in ReliefModificationEndedEET.lua from eventProcessor.lua. ReliefModificationEndedEET.lua: function processEvent2( ev, renderer ) return 5 end eventProcessor.lua: package.path = "./?.lua;./../Resources/custom/rendering programs/?.lua" require( "ReliefModificationEndedEET" ) function processEvent( ev, renderer ) return ReliefModificationEndedEET.processEvent2( ev, renderer ) end When run, processEvent returns a runtime error "...\eventProcessor.lua:7: attempt to index global 'ReliefModificationEndedEET' (a nil value)". Ok, so require doesn't assign a module to ReliefModificationEndedEET like I expected. If I simply rename ReliefModificationEndedEET.lua to something else, require signals an error "file not found", so it looks like it does find the file. I've read through Lua 5.1 specification, and it says require puts the module loader output into package.loaded. So I print out package.loaded["ReliefModificationEndedEET"] and get "true". The docs say this is exactly what happens when the module loader returnes nothing after loading module. I have no idea where to look for this "loader" and what my next step may be;) Any help would be greatly appreciated ;) Thank you
  13. Hi there, I've spent quite some time trying to "include" lua script files into one another, but still I'm confused by "require" and "module" functions. Which one's for what? Thank you
  14. tokaplan

    Shader architecture

    Thanks a lot, this really helps.
  15. Hi there, I have a complicated vertex shader which is responsible, say, for depth shadow mapping. What I need to do is create another version of this shader which differs slightly, for example, supportes one extra texture sampler. Is there any way around creating a duplicate of the same shader with just a couple (probably just one) lines modified? Seems to be a very inconvenient way of doing it. Thank you
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!