- Timestamp:
- 09/04/15 17:46:48 (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r463 r466 177 177 case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete attachment!" ); break; 178 178 case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : NV_LOG_ERROR( "gl_context::check : Framebuffer missing attachment!" ); break; 179 case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete dimensions!" ); break;180 case GL_FRAMEBUFFER_INCOMPLETE_FORMATS : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete formats!" ); break;179 // case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete dimensions!" ); break; 180 // case GL_FRAMEBUFFER_INCOMPLETE_FORMATS : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete formats!" ); break; 181 181 case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete draw buffer!" ); break; 182 182 case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER : NV_LOG_ERROR( "gl_context::check : Framebuffer incomplete read buffer!" ); break; -
trunk/src/gl/gl_device.cc
r463 r466 17 17 gl_device::gl_device() 18 18 { 19 m_shader_header.append( "#version 120\n#extension GL_EXT_texture_array : require\n" );19 m_shader_header.append( "#version 330\n" ); 20 20 for ( auto& i : get_uniform_factory() ) 21 21 m_shader_header.append( "uniform "+datatype_to_glsl_type( i.second->get_datatype() )+" "+ i.first +";\n" ); … … 124 124 if ( is_depth ) 125 125 { 126 #define GL_TEXTURE_DEPTH_SIZE 0x884A 127 #define GL_DEPTH_TEXTURE_MODE 0x884B 128 #define GL_TEXTURE_COMPARE_MODE 0x884C 129 #define GL_TEXTURE_COMPARE_FUNC 0x884D 130 #define GL_COMPARE_R_TO_TEXTURE 0x884E 131 132 #define GL_INTENSITY 0x8049 133 #define GL_LUMINANCE 0x1909 134 // glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE ); 135 // glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL ); 136 // glTexParameteri( GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE ); 137 // glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, 0 ); 138 // glTexParameteri( GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY ); 126 glTexParameteri( gl_type, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); 127 glTexParameteri( gl_type, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); 128 129 // This is to allow usage of shadow2DProj function in the shader 130 glTexParameteri( gl_type, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE ); 131 glTexParameteri( gl_type, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL ); 139 132 } 140 133 … … 182 175 glTexParameteri( gl_type, GL_TEXTURE_WRAP_T, GLint( nv::sampler_wrap_to_enum( asampler.wrap_t ) ) ); 183 176 177 if ( is_depth ) 178 { 179 glTexParameteri( gl_type, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); 180 glTexParameteri( gl_type, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); 181 182 // This is to allow usage of shadow2DProj function in the shader 183 glTexParameteri( gl_type, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE ); 184 glTexParameteri( gl_type, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL ); 185 } 186 184 187 //glTexStorage3D( GL_TEXTURE_2D_ARRAY, mipLevelCount, GL_RGBA8, width, height, layerCount ); 185 188 glTexImage3D( gl_type, 0, GLint( nv::image_format_to_internal_enum( aformat.format ) ), size.x, size.y, size.z, 0, nv::image_format_to_enum( aformat.format ), nv::datatype_to_gl_enum( aformat.type ), data ); … … 366 369 if ( length > 0 ) 367 370 { 368 NV_LOG_INFO( "Program #", p->glid, " log: ", buffer);371 NV_LOG_INFO( "Program #", p->glid, " log: ", string_view( buffer, size_t( length ) ) ); 369 372 } 370 373 -
trunk/src/gl/gl_window.cc
r410 r466 75 75 int attribs[] = 76 76 { 77 WGL_CONTEXT_MAJOR_VERSION_ARB, 2,77 WGL_CONTEXT_MAJOR_VERSION_ARB, 3, 78 78 WGL_CONTEXT_MINOR_VERSION_ARB, 1, 79 79 WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, -
trunk/src/lib/gl.cc
r463 r466 26 26 #define NV_GL_FUN_REN( rtype, fname, rname, fparams ) rtype (NV_GL_APIENTRY *rname) fparams = nullptr; 27 27 #define NV_GL_FUN_EXT NV_GL_FUN 28 #include <nv/lib/detail/gl_ functions.inc>28 #include <nv/lib/detail/gl_core/gl_functions_3_1.inc> 29 29 #if NV_PLATFORM == NV_WINDOWS 30 30 #include <nv/lib/detail/wgl_functions.inc> 31 31 #endif 32 #include <nv/lib/detail/gl_ext/gl_ext_all_functions.inc>33 32 #undef NV_GL_FUN_REN 34 33 #undef NV_GL_FUN_EXT … … 107 106 # define NV_GL_FUN( rtype, fname, fparams ) NV_GL_LOAD( fname ) 108 107 # define NV_GL_FUN_EXT( rtype, fname, fparams ) NV_GL_LOAD_EXT( fname ) 109 # include <nv/lib/detail/gl_ functions.inc>108 # include <nv/lib/detail/gl_core/gl_functions_3_1.inc> 110 109 # undef NV_GL_FUN_EXT 111 110 # undef NV_GL_FUN
Note: See TracChangeset
for help on using the changeset viewer.