-
Posts
183 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by codeape
-
I am pplaying with changing the resolution in my game. My idea was to start simple ... Hit L and the resolution is changed. So when So when I call window->SetLayout(0, 0, 1600, 1200) the resolution is not changed from the default 1024x768.Codes: #include "App.h"#include "game/BranchLoop.h"using namespace Leadwerks;App::App() : window(NULL), context(NULL), world(NULL), camera(NULL), loop(NULL){}App::~App() { if (NULL != loop) { delete loop; } if (NULL != world) { delete world; } if (NULL != window) { delete window; }}bool App::Start(){ //Initialize Steamworks (optional) /*if (!Steamworks::Initialize()) { System::Print("Error: Failed to initialize Steam."); return false; }*/ //Create a window window = Leadwerks::Window::Create("branch"); //Create a context context = Context::Create(window); //Create a world world = World::Create(); //Create a camera camera = Camera::Create(); camera->Move(0,2,-5); loop = new Branch::BranchLoop(context, window, camera); //Hide the mouse cursor window->HideMouse(); std::string mapname = System::GetProperty("map","Maps/start.map"); Map::Load(mapname); //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); return true;}bool App::Loop(){ //Close the window to end the program if (window->Closed()) return false; //Press escape to end freelook mode if (window->KeyHit(Key::Escape)) { window->ShowMouse(); return false; } if (window->KeyHit(Key::L)) { System::Print("Change layout"); window->SetLayout(0, 0, 1600, 1200); } loop->preRenderUpdate(); Leadwerks::Time::Update(); world->Update(); world->Render(); loop->postRenderUpdate(); context->Sync(false); return true;} And yeha, I get the output "Change layout" but nothing happens.
-
Sorry ... I went through some of the links, but missed to check for OS, you are right. That was windows. Well, I hope this gets solved.
-
I do not know if this helps, but it looks like AMD is having problems with flickering all over the place: https://www.google.se/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=radeon+hd+6850+linux+catalyst+driver+flickering+site:forums.amd.com I found some Linux Catalyst 13 dirvers in the mix and various cards including 6850 so do you see this problem in other OpenGL apps?
-
Well I use the Editor for some things like creating prefabs and creating test maps for my hobby game creations. Most things I do are PCG though so I probably do not use all of the functionality of the editor (like terrain). No, I do 99% of my stuff in vanilla Ubuntu 14 and only compile on Windows to test that my stuff works on both platforms. I have developed for Linux since 1998 so I am more comfortable with do things on Linux. EDIT: Some clarifications on my editor usage.
-
So I really like Leadwerks. However, I see that a lot of problems tracked back to GTK and capabilities of different UI toolkits. So why not doing things the Blender way? Create your own OpenGL UI toolkit with a event system and/or a message system and create an editor that uses the same UI toolkit for all platforms. OK, I am not stupid ... this is not a small thing and maybe not the most fun thing to do. However it could be a long time goal and a nice evolution of Leadwerks. There are many pros: + Same UI code for all platforms. + The UI could be used by both the editor and in the games we make with Leadwerks. + You will be using your own UI that you have 100% control over. + UI is a feature people want + No more OS dependent UI bugs. The con: - More things to do. - It will take a loooooooooooooong time to accomplish.
-
I am a happy Linux user too. I have had few problems with Leadwerks. I might not be the most active user on the forum but I am having fun with Leadwerks on Linux.
-
Freetype-gl uses SDF: https://github.com/rougier/freetype-gl The result look good.
-
Ok this is pretty cool. I sugested that Limit Theory (a awesomely looking and upcoming space game) to implement SDF: http://forums.ltheory.com/viewtopic.php?f=6&t=2137&p=28611&hilit=sdf#p28611 After a couple of months he did it! With better font render quality and performance than the old solution (through SFML): http://forums.ltheory.com/viewtopic.php?f=12&t=3875&p=75231&hilit=sdf#p75231 Here is the result (30:01 in to the dev video ... the link point to that part of the video ): I think you should do what he did. Implement SDF your self and do not use third party stuff.
-
You are starting to get good at this YouGroove!
-
Indeed, the distance from Stockholm to Seattle is sadly 7587 km. Hmmm need to make a game so I can afford the trip
-
You need to start the game from the same dir where the game binary is. cd /path/to/game ./mygame Arch is by the way not a dist supported by Leadwerks.
-
I do this: > cd ~/.steam/steam/SteamApps/common/Leadwerks > find . -name *.bak* ./MyGame/Shaders/PostEffects/Bloom/hblur.shader.bak1 ./MyGame/Shaders/PostEffects/Bloom/vblur.shader.bak1 ./MyGame/Shaders/PostEffects/Bloom/bloom.shader.bak1 ./Templates/Common/Shaders/PostEffects/Bloom/hblur.shader.bak1 ./Templates/Common/Shaders/PostEffects/Bloom/vblur.shader.bak1 ./Templates/Common/Shaders/PostEffects/Bloom/bloom.shader.bak1 Should I be concerned over the bak files? Ok, they should be backups but to me they look newer than my non bak versions.
-
I looked in the update.log after the last update: Copying "/home/codeape/.steam/steam/SteamApps/common/Leadwerks/Templates/Common/Shaders\PostEffects\Bloom\hblur.shader.bak1" to "/home/codeape/src/git/leadwerks/branch/branch/Shaders\PostEffects\Bloom\hblur.shader.bak1"... Copying "/home/codeape/.steam/steam/SteamApps/common/Leadwerks/Templates/Common/Shaders\PostEffects\Bloom\vblur.shader.bak1" to "/home/codeape/src/git/leadwerks/branch/branch/Shaders\PostEffects\Bloom\vblur.shader.bak1"... Copying "/home/codeape/.steam/steam/SteamApps/common/Leadwerks/Templates/Common/Shaders\PostEffects\Bloom\bloom.shader.bak1" to "/home/codeape/src/git/leadwerks/branch/branch/Shaders\PostEffects\Bloom\bloom.shader.bak1"... Why is Leadwerks copying bak1 files from .steam/steam/SteamApps/common/Leadwerks/Templates/ to my project? Here is a diff of branch/Shaders\PostEffects\Bloom\bloom.shader and branch/Shaders\PostEffects\Bloom\bloom.shader.bak1 diff -w bloom.shader bloom.shader.bak1 78c78 < uniform float overdrive=1.0;//The higher this value, the brighter the bloom effect will be --- > uniform float overdrive=2.0;//The higher this value, the brighter the bloom effect will be Is this a bug?
-
[LE 3.2, Steam, Linux] Leadwerks crashes on edit texture
codeape replied to codeape's topic in Leadwerks Engine Bug Reports
Ok, all I had to do to get the bug to go away was to start steam like this: export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 steam Found it in another thread posted this week ... 2 months without a working Texture Editor has been a bit tough though. My original list of LC and LANG looks like this: LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ADDRESS="sv_SE.UTF-8" LC_IDENTIFICATION="sv_SE.UTF-8" LC_MEASUREMENT="sv_SE.UTF-8" LC_MONETARY="sv_SE.UTF-8" LC_NAME="sv_SE.UTF-8" LC_NUMERIC="sv_SE.UTF-8" LC_PAPER="sv_SE.UTF-8" LC_TELEPHONE="sv_SE.UTF-8" LC_TIME="sv_SE.UTF-8" So I had the LANG correct but I had not set LC_ALL=en_US.UTF-8. -
Haha cool ide
-
Very nice indeed. Thank you for all the help guys
-
Thnx, got it. Another question about reference counting. If I do like this: class A { ... Shader aShader1 = Shader::Load("shaders/my.shader") ... } ... class B { ... Shader sameShade = Shader::Load("shaders/my.shader") ... } Will this result in a ref count of 2 for the same instace of a Shader instance using "shaders/my.shader" or will this result in 2 instances of Shader with a refcount of 1 each. I can not find any info about that in the doc. Thank you again.
-
Yes of course ... but I am a tidy person
-
If I do not do shader->Release() but have done shader->AddRef(), wouldn't I get a memory leak? Isn't the point that when shader->Release() make the ref count go to 0 the Leadwerks::Object sub-class freed? Have I misunderstood Leadwerks ref count completely?
-
I understand the concept of reference counting and I have read this: http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/getting-started/reference-counting-r613 As I understand it I can get the total amount of references to a Leadwerks::Object sub-class instance by doing this (C++): shader = material->GetShader(); int count = shader->GetRefCount() My question is if it is possible to get the total amount of references for all instances of Leadwerks::Object and sub-classes. I want to print it right before I exit my game so that I know that all my resources has been released (avoid memory leaks). Thanks for any help in advance.
-
Optimization: Efficient Virtual Shadow Maps for Many Lights
codeape posted a topic in Suggestion Box
Hello, This is not a suggestion on a new feature directly. I suggest you read this paper and see if it could be of any use for Leadwerks: http://www.cse.chalmers.se/~olaolss/get_file.php?filename=papers/clustered_with_shadows.pdf Here is a page with some slides about the paper too: http://www.cse.chalmers.se/~olaolss/main_frame.php?contents=publication&id=clustered_with_shadows I have not read it in detail but it looks like a good optimization that could work with deferred rendering. I hope It can be of help. -
Hello, I know that the set of tools I have to work with is Font::GetHeight, Font::GetTextWidth and Context::DrawText. I am creating a (reusable) UI lib for my current project. I want to be able to clip text. Does anyone has some experience to share about implementing a text field in C++ using Leadwerks. What are the pitfalls etc. Thank you in advance!