Search found 12 matches

by juanjpro
Sun Jan 11, 2015 10:23 pm
Forum: Beginners Help
Topic: 2D harder than 3D
Replies: 4
Views: 647

Re: 2D harder than 3D

getTexture should be able to load PNGs by default. You need to set the last parameter of draw2DImage to true to make it use the alpha channel.

Code: Select all

irr::video::ITexture* texture = driver->getTexture("image.png");
driver->draw2DImage(texture,destRect,sourceRect,0,0,true);
by juanjpro
Sun Jan 11, 2015 5:54 pm
Forum: Beginners Help
Topic: 2D harder than 3D
Replies: 4
Views: 647

Re: 2D harder than 3D

Are you calling your 2D functions before or after calling drawAll?

Irrlicht already supports PNGs, you just load them with getTexture and use draw2DImage like you would with any other image.
by juanjpro
Tue Jan 06, 2015 8:58 pm
Forum: Beginners Help
Topic: Normalmaps look rubbish
Replies: 18
Views: 2249

Re: Normalmaps look rubbish

Looks like we're getting somewhere. Are you sure that loadMesh isn't being called? That line you added should work for loadPiece. Also, there should be a diffuse texture (you can use a solid white texture so you can focus on the normal map) or you'll probably get garbage for texture 0, that happened...
by juanjpro
Tue Jan 06, 2015 1:24 pm
Forum: Beginners Help
Topic: Normalmaps look rubbish
Replies: 18
Views: 2249

Re: Normalmaps look rubbish

So you don't load the normal map directly, instead it's referenced by the .obj file? Maybe the textures aren't ordered the way Irrlicht expects, try applying the textures manually: node->getMaterial(0).setTexture(0,diffuse); //give the model a diffuse texture, otherwise you'll see garbage node->getM...
by juanjpro
Mon Jan 05, 2015 9:19 pm
Forum: Beginners Help
Topic: Normalmaps look rubbish
Replies: 18
Views: 2249

Re: Normalmaps look rubbish

Could you share the diffuse texture and code related to the grenade as well? The screenshot has several details that aren't defined in the normal map.
by juanjpro
Sun Jan 04, 2015 6:26 pm
Forum: Beginners Help
Topic: Normalmaps look rubbish
Replies: 18
Views: 2249

Re: Normalmaps look rubbish

Does it look better if you move the camera closer to it? It might be mipmapping that's fading out the details of your normal map.
by juanjpro
Mon Dec 15, 2014 7:20 pm
Forum: Code Snippets
Topic: How to Move MyEventReceiver into a separate file
Replies: 7
Views: 3313

Re: How to Move MyEventReceiver into a separate file

Asimov wrote:I know what a bool is, but not sure what a virtual bool is.
"virtual" does not affect the type returned by the function, it's to allow derived classes to redefine inherited functions. http://www.cplusplus.com/doc/tutorial/p ... al_members
by juanjpro
Sun Dec 14, 2014 10:10 pm
Forum: Beginners Help
Topic: What is the difference between public and public
Replies: 2
Views: 326

Re: What is the difference between public and public

That's inheritance: http://www.cplusplus.com/doc/tutorial/i ... nheritance

In Irrlicht you need inheritance so the engine can use your custom event receivers/light managers/etc, otherwise it wouldn't be possible to cast pointers to something Irrlicht recognizes.
by juanjpro
Sat Dec 06, 2014 12:54 pm
Forum: Beginners Help
Topic: Purple model
Replies: 15
Views: 1769

Re: Purple model

Have you tried other models to see if they have this issue?
by juanjpro
Sun Nov 30, 2014 4:29 pm
Forum: Advanced Help
Topic: (Solved)Question about BlendOperation(SOLVED)
Replies: 40
Views: 5321

Re: Question about BlendOperation

The_Glitch wrote:Nowhere in my code which is just Irrlicht's simple RTT example do I say use OpenGL drivers but then pass an HLSL shader.
Sorry, my mistake.

After looking through this a bit better, I think you should be sending the sampler to the shader with the shader callback.
by juanjpro
Sun Nov 30, 2014 3:21 pm
Forum: Advanced Help
Topic: (Solved)Question about BlendOperation(SOLVED)
Replies: 40
Views: 5321

Re: Question about BlendOperation

--Edit: forget about this, I misunderstood everything-- HLSL doesn't work with OpenGL. Either change your driver type to EDT_DIRECT3D9, or use this GLSL equivalent to saturation.hlsl (I'm not sure if this will work): //saturation_vertexShader.vert   uniform mat4 matViewProjection;   varying vec2 tex...
by juanjpro
Mon Nov 24, 2014 1:20 pm
Forum: Project Announcements
Topic: SCP - Containment Breach - Irrlicht Port
Replies: 2
Views: 4794

SCP - Containment Breach - Irrlicht Port

http://scpcbgame.com/ SCP - Containment Breach is a free survival horror game written in Blitz3D. The events of the game take place in a containment site of The SCP Foundation, a secret organization dedicated to containing and researching anomalous artifacts and entities that threaten the normality...