Home Forums Development discussions Questions

Tagged: , ,

Viewing 5 posts - 91 through 95 (of 95 total)
  • Author
    Posts
  • #719
    Mury
    Participant

    For what I see everything related to draw and frustum is in Game.cpp void NeoGame::draw(void) is that correct?

    • This reply was modified 9 years, 3 months ago by Mury.
    • This reply was modified 9 years, 3 months ago by Mury.
    #725
    Sponk
    Keymaster

    Not quite. Most rendering functionality is in Neo::StandardRenderer and Neo::FixedRenderer. Neo::NeoGame just sets up the environment for those classes to render correctly. This way it is possible to redirect the output to a texture or to allow layering two scenes. Neo::NeoGame also sets up post processing if it is active and redirects all output onto there.

    Both renderers only access the abstract rendering context to allow API independence. You could write an interface for Direct3D, GLES, GL, Mantle or any other API for that matter this way, without changing one line of code anywhere else. The only problem would be replacing the GLSL shaders since those do not work with D3D of course.

    Every behavior also has a “draw” method that allows you to draw custom graphics in your behaviors. The particle system behavior does that for example.

    #726
    Akira_San
    Participant

    In Neo Gui -> Render.cpp, is the shader hardcoded? Am just asking, cos it looks like loading only one image. And adding normal and spec texture too can have a nice of a look effect. Just like in this vid. -> https://www.youtube.com/watch?v=Xmn6zhDJGLE

    #728
    Sponk
    Keymaster

    Yes, the shader is hardcoded in the NeoGui library.
    I have to admit that it looks quite nice if done well. Just one problem: A normal/spec map needs some sort of lighting to do those calculations. The current 2D renderer does not have any lighting support. I doubt that it would be useful in any GUI situation so I guess this feature would only be implemented for Sprites and Tiles.

    We need nothing fancy there. Just some 2D light sources with X/Y position and radius. Everything else can be calculated using that. And of course: Allow loading textures for normal and spec map 😀

    #729
    Akira_San
    Participant

    Right. What about having a 2d Spot light too. Good for dark horror games.

Viewing 5 posts - 91 through 95 (of 95 total)
  • You must be logged in to reply to this topic.