Changeset 322


Ignore:
Timestamp:
08/25/14 04:27:26 (11 years ago)
Author:
epyon
Message:
  • profiler control via define/NV_DEBUG
  • weird RELEASE mode audio error - need to investigate
  • fixed - render_state in RELEASE mode would not set depth_mask!
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/core/common.hh

    r319 r322  
    8282#define NV_DEBUG 0
    8383#endif
     84#endif
     85
     86#if NV_DEBUG
     87#ifndef NV_PROFILER
     88#define NV_PROFILER
     89#endif
     90#endif
     91
     92#ifdef NV_PROFILER
     93#undef NV_PROFILER
     94#define NV_PROFILER 1
     95#else
     96#define NV_PROFILER 0
    8497#endif
    8598
  • trunk/nv/core/profiler.hh

    r319 r322  
    1818#include <unordered_map>
    1919
     20#if NV_PROFILER
    2021#define NV_PROFILE( tag ) nv::profiler_guard __profile( tag )
     22#else
     23#define NV_PROFILE( tag )
     24#endif
    2125
    2226namespace nv
  • trunk/nv/interface/render_state.hh

    r319 r322  
    9595
    9696                blending() :
     97                        enabled( false ),
    9798                        src_rgb_factor( ONE ), src_alpha_factor( ONE ),
    9899                        dst_rgb_factor( ZERO ), dst_alpha_factor( ZERO ),
     
    199200                nv::polygon_mode polygon_mode;
    200201                bool depth_mask;
     202                render_state() : depth_mask( true ) {}
    201203        };
    202204
  • trunk/src/gui/gui_renderer.cc

    r319 r322  
    1111#include "nv/interface/device.hh"
    1212#include "nv/interface/context.hh"
     13#include "nv/core/logging.hh"
    1314
    1415static const char *nv_gui_vertex_shader =
     
    123124        , m_reupload( true )
    124125{
     126        NV_LOG( LOG_TRACE, "Creating GUI renderer..." );
    125127        m_context = w->get_context();
    126128        m_area.dim( dimension( w->get_width(), w->get_height() ) );
     
    133135        delete[] wfill;
    134136
     137        NV_LOG( LOG_TRACE, "Creating render data..." );
    135138        screen_render_data* sr = new screen_render_data( w->get_context(), 1024 );
    136139        m_render_data = sr;
     
    152155        m_render_state.blending.src_alpha_factor = blending::SRC_ALPHA;
    153156        m_render_state.blending.dst_alpha_factor = blending::ONE_MINUS_SRC_ALPHA;
     157        NV_LOG( LOG_TRACE, "GUI Renderer created" );
    154158}
    155159
  • trunk/src/sdl/sdl_audio.cc

    r319 r322  
    4343nv::sound* nv::sdl::audio::load_sound( const std::string& a_path )
    4444{
    45         Mix_Chunk *sample = Mix_LoadWAV( a_path.c_str() );
     45        // TODO: this is a really wierd error - if we remove this check, all hell gets loose
     46        if ( Mix_LoadWAV_RW == nullptr || SDL_RWFromFile == nullptr )
     47        {
     48                NV_LOG( LOG_ERROR, "SDL_mixer not loaded!" );
     49        }
     50        Mix_Chunk *sample = Mix_LoadWAV_RW(SDL_RWFromFile(a_path.c_str(), "rb"), 1);
    4651        if ( sample == nullptr )
    4752        {
Note: See TracChangeset for help on using the changeset viewer.