Search found 35 matches
- Tue Nov 11, 2014 4:56 am
- Forum: Advanced Help
- Topic: OnNodePreRender()
- Replies: 5
- Views: 997
Re: OnNodePreRender()
Ok, I've "solved" this, but I'm putting "solved" in quotes because it's not a very good solution. The real solution would be to tinker with the CSceneManager code itself and slightly change the order in which lights are handled. The problem is exactly as you stated -- the render(...
- Sun Nov 09, 2014 4:42 pm
- Forum: Advanced Help
- Topic: OnNodePreRender()
- Replies: 5
- Views: 997
Re: OnNodePreRender()
I believe the sort in CSceneManager only happens if no custom light manager is used. edit: This one supports 200+ lights: viewtopic.php?f=6&t=37811 I'm checking out both Sudi's renderer and IrrRenderer now. I'm wondering if they support both OpenGL and DirectX, because I don't want to be locked ...
- Sun Nov 09, 2014 4:26 am
- Forum: Advanced Help
- Topic: OnNodePreRender()
- Replies: 5
- Views: 997
Re: OnNodePreRender()
Function drawAll() of SceneManager.cpp, beginning on line 1346, should answer that question. Basically, the lights are drawn before the node is, so changing the light color does nothing. Crud. I saw that code as I was snooping around and guessed it might be the problem -- but can you tell me, what ...
- Thu Nov 06, 2014 11:43 pm
- Forum: Advanced Help
- Topic: OnNodePreRender()
- Replies: 5
- Views: 997
OnNodePreRender()
I'm experimenting with a custom light manager. I borrowed code from Example 20 and everything seemed fine. Then, I experimented with changing the color of the lights in the scene during OnNodePreRender(). Is that allowed? It doesn't seem to work correctly. I've boiled the failing example down to the...
- Thu Jun 12, 2014 3:16 pm
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
Yeah, I guess I pretty much have to punt at this point and not allow graphics settings to be modified in-game. It's too buggy. Disappointing. I spent a fair amount of time on a nice looking menu system to allow it. Maybe I'll get motivated enough at some point to try debugging the Irrlicht code.
- Thu Jun 12, 2014 4:39 am
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
Ok, so how do I change the graphics settings? I took that code from a post here in the forums.
- Wed Jun 11, 2014 11:45 pm
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
More info on the second issue -- what appears to be happening is that the textures are all wrong. My nodes are still there, I think, but some of them lose their textures or start using the wrong texture. The camera also appears to be in the wrong place -- probably as a result of the screen resolutio...
- Wed Jun 11, 2014 4:49 am
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
After much progress, I've come back to this topic with a related question. First, though, I have an answer to the question I originally asked: What I'm seeing is that the call to "m_scene->clear()" isn't really clearing the meshes. They still sort of exist, behind the scenes, which causes ...
- Mon May 12, 2014 12:09 am
- Forum: Beginners Help
- Topic: Change Mouse Cursor
- Replies: 7
- Views: 597
Re: Change Mouse Cursor
Yep, that was exactly the problem. I was doing it outside the begin/end scene calls.Seven wrote:When are you rendering?
Thanks for the help.
- Sun May 11, 2014 8:00 pm
- Forum: Beginners Help
- Topic: Change Mouse Cursor
- Replies: 7
- Views: 597
Re: Change Mouse Cursor
Any idea why my SW approach doesn't work? I took this from tutorial 6. irr::video::ITexture* tex = driver->getTexture("E:\\Projects\\shmup-1\\test_cursor.png"); driver->draw2DImage(tex, device->getCursorControl()->getPosition()); I have verified that "tex" is not null, wh...
- Sun May 11, 2014 6:23 pm
- Forum: Beginners Help
- Topic: Change Mouse Cursor
- Replies: 7
- Views: 597
Re: Change Mouse Cursor
Ok, but suppose I do want to change the HW cursor? I'm just looking to write simple function, e.g.: void change_mouse_cursor(const string &image_filename, irr::core::vector2di hotspot) { // ... load the image into a sprite (or something?) // ... set the hotspot and whatever else // ... ...
- Sun May 11, 2014 3:09 am
- Forum: Beginners Help
- Topic: Change Mouse Cursor
- Replies: 7
- Views: 597
Change Mouse Cursor
I know this has to be an easy one, but I simply can't find anything helpful in the forum or elsewhere. I'm overlooking something. I just want to change the mouse cursor to a custom image -- say a 32x32 PNG or whatever. I see that tutorial 24 does this, but it's very confusing to me. I don't need an ...
- Sat Sep 07, 2013 5:28 pm
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
That would be more efficient... is there a particular method to call to "save" a scene manager, or do I just copy it via the standard "=" operator?Marthog wrote:I don't think that recreating is a good solution. You can grab the SceneManagers and reuse them for the new device.
- Sat Sep 07, 2013 5:13 pm
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
To follow up, I went with multiple SceneManagers. It works nicely. There is one catch if you go with this approach, though. Suppose your "main" scene is the actual game, and your second scene is the menu. If the player opens the menu and changes graphics options, that will cause the device...
- Sat Sep 07, 2013 3:22 pm
- Forum: Beginners Help
- Topic: How to really "clear" a scene
- Replies: 12
- Views: 1374
Re: How to really "clear" a scene
The node did get cleared, but the mesh stayed in the mesh cache. As you modified the mesh directly (instead of scaling the node in the addMeshSceneNode function), the scaling persists. Keeping the cache is advised, as it speeds up your transitions back and forth. Don't scale the model, scale the no...