-
Posts
314 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Brutile
-
-
If anyone knows C++, please help...
I'm trying to initialize a constant variable using a static variable from another class.
I want to assign:
// a.h
static const short worldHeight = 128;
To:
// b.h
static const short height = a::worldHeight;
So I can then do this:
// b.h
bool stuff[height];
But I get errors. Anyone know how to achieve this?
-
I think multiple worlds is a good way of doing things, but I still think you shouldn't need to use textures and buffers. There should simply be a way of culling the background of a camera, then rendering the two worlds.
-
SetAnisotropy gives me a script error: error in function 'SetAnisotropy' argument #1 is 'Texture'; 'Texture' expeced. I'm using Lua.
-
Thanks shadmar, that worked, but the objects in the worlds are now pixellated, even with multisampling turned up. Is there a way to fix it?
-
Ok, that makes sense and I got it mostly working, but when I render, it will only show the last world that I rendered. It was rendering the background, which rendered over the top of the first one.
-
Not sure if there is something already in Leadwerks to do this, but I would like something similar to Unity3D's camera layer system, where you could set an object (like a gun) on a layer that the camera could cull. You could then setup two cameras, one that renders the environment, and another that just rendered the gun. This would be helpful in stopping weapons passing through walls, and would also allow higher FOV without making the gun look stretched and horrible.
- 1
-
I'm getting a script error with the surface:UpdateAABB(). I've also tried surface:Update() and surface:Update(true) but I get the error: "attempt to call method 'Update' (a nil value)'. and It doesn't update the colour of the model. Any ideas?
-
Thanks, I'll try it out
-
Is it possible to create geometry in a script at runtime?
I'm looking to convert a voxel engine (Minecraft terrain) I made in Unity3d to Leadwerks,
but I don't know what can and can't be done in Lua.
I need to be able to create a mesh using polygons (not just creating cubes).
Can this be done? and if so, how?
C++ initializing const variable using static variable from another class
in Programming
Posted
I can't pass it directly into the stuff array either.
The errors are:
1. use of undefined type 'a'
2. 'worldHeight': undeclared identifier
3. expected constant expression
Even though everything is declared at compile time.
Alternatively, If anyone knows how to make a class that holds variables that only need to be assigned once, and can be used for all classes. I'm only doing this so I don't need to make multiple instances of the same value.