[osg-users] [About VertexArrayObject Branch] FeedBack and Insight

Remo Eichenberger osgforum at tevs.eu
Fri Aug 19 06:17:29 PDT 2016


Hi Julien

Thanks for your hint :) I've tried it with GL3 core profile on MacOSX 10.11.6 with "vertex_array_object" branch. I tried to load a stock OSG sample model: glider.osg (and also glsl_simple.osgt). But i can't see the model. Here is my debug output:


Code:

Duplicate enum value 10 with old string: GL_LINES_ADJACENCY_EXT and new string: GL_LINES_ADJACENCY
Duplicate enum value 11 with old string: GL_LINE_STRIP_ADJACENCY_EXT and new string: GL_LINE_STRIP_ADJACENCY
Duplicate enum value 12 with old string: GL_TRIANGLES_ADJACENCY_EXT and new string: GL_TRIANGLES_ADJACENCY
Duplicate enum value 13 with old string: GL_TRIANGLE_STRIP_ADJACENCY_EXT and new string: GL_TRIANGLE_STRIP_ADJACENCY
DatabasePager::addDatabaseThread() HANDLE_NON_HTTP
DatabasePager::addDatabaseThread() HANDLE_ONLY_HTTP
Opened DynamicLibrary osgPlugins-3.5.4/osgdb_osgd.so
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
Constructing PixelBufferObject for image=0x10300a8c0
Opened DynamicLibrary osgPlugins-3.5.4/osgdb_deprecated_osgd.so
OSGReaderWriter wrappers loaded OK

Stats before:
 Object Type    Unique Instanced
 -----------    ------ ---------
 StateSet            3         6
 Group               0         0
 Transform           0         0
 LOD                 0         0
 Switch              0         0
 Geode               1         1
 Drawable            6         6
 Geometry            6         6
 Fast geom.          6         6
 Vertices          676       676
 Primitives        640       640
Optimizer::optimize() doing TESSELLATE_GEOMETRY
Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES
Optimizer::optimize() doing COMBINE_ADJACENT_LODS
Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS
Optimizer::optimize() doing SHARE_DUPLICATE_STATE
Num of StateSet=3
state attribute list
    0x103329380  Material
    0x103329f60  Material
searching for duplicate attributes
searching for duplicate attributes
Optimizer::optimize() doing TEXTURE_ATLAS_BUILDER
Num of StateSet=3
state attribute list
    0x103329380  Material
    0x103329f60  Material
searching for duplicate attributes
searching for duplicate attributes
Optimizer::optimize() doing COPY_SHARED_NODES
Shared node 0
Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
Optimizer::optimize() doing MERGE_GEODES
MERGE_GEODES took 4e-06
Optimizer::optimize() doing CHECK_GEOMETRY
Optimizer::optimize() doing MAKE_FAST_GEOMETRY
Optimizer::optimize() doing MERGE_GEOMETRY
MERGE_GEOMETRY took 4.4e-05
Optimizer::optimize() doing TRISTRIP_GEOMETRY
TriStripVisitor::stripify(Geometry&): Number of indices546 numUnique294
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.85714
TriStripVisitor::stripify(Geometry&):     doing tri strip
TriStripVisitor::stripify(Geometry&): Number of indices26 numUnique24
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.08333
TriStripVisitor::stripify(Geometry&):     doing tri strip
TriStripVisitor::stripify(Geometry&): Number of indices26 numUnique24
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.08333
TriStripVisitor::stripify(Geometry&):     doing tri strip
TriStripVisitor::stripify(Geometry&): Number of indices26 numUnique24
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.08333
TriStripVisitor::stripify(Geometry&):     doing tri strip
TriStripVisitor::stripify(Geometry&): Number of indices26 numUnique24
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.08333
TriStripVisitor::stripify(Geometry&):     doing tri strip
TriStripVisitor::stripify(Geometry&): Number of indices26 numUnique24
TriStripVisitor::stripify(Geometry&):     ratio indices/numUnique1.08333
TriStripVisitor::stripify(Geometry&):     doing tri strip
Optimizer::optimize() doing REMOVE_REDUNDANT_NODES
Optimizer::optimize() doing SPATIALIZE_GROUPS
Optimizer::optimize() doing BUFFER_OBJECT_SETTINGS
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)

Stats after:
 Object Type    Unique Instanced
 -----------    ------ ---------
 StateSet            3         6
 Group               0         0
 Transform           0         0
 LOD                 0         0
 Switch              0         0
 Geode               1         1
 Drawable            6         6
 Geometry            6         6
 Fast geom.          6         6
 Vertices          414       414
 Primitives        640       640
CocoaWindowingSystemInterface::initAsStandaloneApplication 
ContextData::registerGraphicsContext 0x103008a50
ShaderComposer::ShaderComposer() 0x103010d60
ContextData::ContextData()0x103013e70
ContextData::createNewContextID() creating contextID=0
Updating the MaxNumberOfGraphicsContexts to 1
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
ShaderComposer::ShaderComposer() 0x103016d70
CullSettings::readEnvironmentalVariables()
ShaderComposer::ShaderComposer() 0x1030188b0
View::setSceneData() Reusing existing scene0x103014640
 CameraManipulator::computeHomePosition(0x0, 0)
    boundingSphere.center() = (0.1354 0 -0.00415)
    boundingSphere.radius() = 1.07553
 CameraManipulator::computeHomePosition(0x103013fb0, 0)
    boundingSphere.center() = (0.1354 0 -0.00415)
    boundingSphere.radius() = 1.07553
TextureObjectManager::TextureObjectManager()0x101714a70
osg::State::_maxTexturePoolSize=0
GLBufferObjectManager::GLBufferObjectManager()0x10170c630
osg::State::_maxBufferObjectPoolSize=0
GraphicsWindowCocoa :: grabFocusIfPointerInWindow not implemented yet 
Viewer::startThreading() - starting threading
Viewer::startThreading() - contexts.size()=1
Making scene thread safe
Doing add
Doing add
Doing add
  gc->getGraphicsThread()->startThread() 0x10301e380
Set up threading
View::init()
GL_VENDOR = [NVIDIA_Corporation]
OpenGL extensions supported by installed OpenGL drivers are:
    GL_APPLE_client_storage
    GL_APPLE_container_object_shareable
    GL_APPLE_flush_render
    GL_APPLE_object_purgeable
    GL_APPLE_rgb_422
    GL_APPLE_row_bytes
    GL_APPLE_texture_range
    GL_ARB_ES2_compatibility
    GL_ARB_blend_func_extended
    GL_ARB_draw_buffers_blend
    GL_ARB_draw_indirect
    GL_ARB_explicit_attrib_location
    GL_ARB_gpu_shader5
    GL_ARB_gpu_shader_fp64
    GL_ARB_instanced_arrays
    GL_ARB_internalformat_query
    GL_ARB_occlusion_query2
    GL_ARB_sample_shading
    GL_ARB_sampler_objects
    GL_ARB_separate_shader_objects
    GL_ARB_shader_bit_encoding
    GL_ARB_shader_subroutine
    GL_ARB_shading_language_include
    GL_ARB_tessellation_shader
    GL_ARB_texture_buffer_object_rgb32
    GL_ARB_texture_cube_map_array
    GL_ARB_texture_gather
    GL_ARB_texture_query_lod
    GL_ARB_texture_rgb10_a2ui
    GL_ARB_texture_storage
    GL_ARB_texture_swizzle
    GL_ARB_timer_query
    GL_ARB_transform_feedback2
    GL_ARB_transform_feedback3
    GL_ARB_vertex_attrib_64bit
    GL_ARB_vertex_type_2_10_10_10_rev
    GL_ARB_viewport_array
    GL_ATI_texture_mirror_once
    GL_EXT_debug_label
    GL_EXT_debug_marker
    GL_EXT_depth_bounds_test
    GL_EXT_framebuffer_multisample_blit_scaled
    GL_EXT_texture_compression_s3tc
    GL_EXT_texture_filter_anisotropic
    GL_EXT_texture_mirror_clamp
    GL_EXT_texture_sRGB_decode
    GL_NV_texture_barrier
OpenGL extension 'GL_EXT_geometry_shader4' is not supported.
OpenGL extension 'GL_EXT_gpu_shader4' is not supported.
OpenGL extension 'GL_ARB_tessellation_shader' is supported.
OpenGL extension 'GL_ARB_uniform_buffer_object' is not supported.
OpenGL extension 'GL_ARB_get_program_binary' is not supported.
OpenGL extension 'GL_ARB_gpu_shader_fp64' is supported.
OpenGL extension 'GL_ARB_shader_atomic_counters' is not supported.
OpenGL extension 'GL_ARB_shader_atomic_counters' is not supported.
OpenGL extension 'GL_ARB_clip_control' is not supported.
glVersion=4.1, isGlslSupported=YES, glslLanguageVersion=4.1
OpenGL extension 'GL_ARB_uniform_buffer_object' is not supported.
OpenGL extension 'GL_ARB_texture_buffer_object' is not supported.
OpenGL extension 'GL_ARB_vertex_array_object' is not supported.
OpenGL extension 'GL_ARB_transform_feedback2' is supported.
OpenGL extension 'GL_EXT_secondary_color' is not supported.
OpenGL extension 'GL_EXT_fog_coord' is not supported.
OpenGL extension 'GL_ARB_multitexture' is not supported.
OpenGL extension 'GL_NV_occlusion_query' is not supported.
OpenGL extension 'GL_EXT_timer_query' is not supported.
OpenGL extension 'GL_ARB_timer_query' is supported.
OpenGL extension 'GL_ARB_texture_multisample' is not supported.
OpenGL extension 'GL_ARB_vertex_program' is not supported.
OpenGL extension 'GL_ARB_fragment_program' is not supported.
OpenGL extension 'GL_EXT_texture_filter_anisotropic' is supported.
OpenGL extension 'GL_ARB_texture_swizzle' is supported.
OpenGL extension 'GL_EXT_texture_compression_s3tc' is supported.
OpenGL extension 'GL_IMG_texture_compression_pvrtc' is not supported.
OpenGL extension 'GL_OES_compressed_ETC1_RGB8_texture' is not supported.
OpenGL extension 'GL_ARB_ES3_compatibility' is not supported.
OpenGL extension 'GL_EXT_texture_compression_rgtc' is not supported.
OpenGL extension 'GL_IMG_texture_compression_pvrtc' is not supported.
OpenGL extension 'GL_ARB_texture_multisample' is not supported.
OpenGL extension 'GL_ARB_shadow_ambient' is not supported.
OpenGL extension 'GL_APPLE_client_storage' is supported.
OpenGL extension 'GL_SGIX_blend_alpha_minmax' is not supported.
OpenGL extension 'GL_EXT_blend_logic_op' is not supported.
OpenGL extension 'GL_EXT_stencil_wrap' is supported.
OpenGL extension 'GL_EXT_stencil_two_side' is not supported.
OpenGL extension 'GL_ATI_separate_stencil' is not supported.
OpenGL extension 'GL_NV_multisample_filter_hint' is not supported.
OpenGL extension 'GL_EXT_framebuffer_object' is supported.
OpenGL extension 'GL_ARB_viewport_array' is supported.
GraphicsCostEstimator::calibrate(..)
Doing run 0x10301e380 isRunning()=1
State::convertShaderSourceToOsgBuiltIns()
++Before Converted source 
#version 150 
 
uniform mat4 osg_ModelViewProjectionMatrix; 
uniform mat3 osg_NormalMatrix; 
uniform vec3 ecLightDir; 
 
in vec4 osg_Vertex; 
in vec3 osg_Normal; 
out vec4 color; 
 
void main() 
{ 
    vec3 ecNormal = normalize( osg_NormalMatrix * osg_Normal ); 
    float diffuse = max( dot( ecLightDir, ecNormal ), 0. ); 
    color = vec4( vec3( diffuse ), 1. ); 
 
    gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; 
} 

++++++++
shader version found: 150
-------- Converted source 
#version 150 
 
uniform mat4 osg_ModelViewProjectionMatrix; 
uniform mat3 osg_NormalMatrix; 
uniform vec3 ecLightDir; 
 
in vec4 osg_Vertex; 
in vec3 osg_Normal; 
out vec4 color; 
 
void main() 
{ 
    vec3 ecNormal = normalize( osg_NormalMatrix * osg_Normal ); 
    float diffuse = max( dot( ecLightDir, ecNormal ), 0. ); 
    color = vec4( vec3( diffuse ), 1. ); 
 
    gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; 
} 

----------------

Compiling VERTEX source:
    1: #version 150 
    2:  
    3: uniform mat4 osg_ModelViewProjectionMatrix; 
    4: uniform mat3 osg_NormalMatrix; 
    5: uniform vec3 ecLightDir; 
    6:  
    7: in vec4 osg_Vertex; 
    8: in vec3 osg_Normal; 
    9: out vec4 color; 
   10:  
   11: void main() 
   12: { 
   13:     vec3 ecNormal = normalize( osg_NormalMatrix * osg_Normal ); 
   14:     float diffuse = max( dot( ecLightDir, ecNormal ), 0. ); 
   15:     color = vec4( vec3( diffuse ), 1. ); 
   16:  
   17:     gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; 
   18: } 


Compiling FRAGMENT source:
    1: #version 150 
    2:  
    3: in vec4 color; 
    4: out vec4 fragData; 
    5:  
    6: void main() 
    7: { 
    8:     fragData = color; 
    9: } 

Linking osg::Program "" id=3 contextID=0
State's vertex attrib binding 2, osg_Color
State's vertex attrib binding 12, osg_FogCoord
State's vertex attrib binding 3, osg_MultiTexCoord0
State's vertex attrib binding 4, osg_MultiTexCoord1
State's vertex attrib binding 5, osg_MultiTexCoord2
State's vertex attrib binding 6, osg_MultiTexCoord3
State's vertex attrib binding 7, osg_MultiTexCoord4
State's vertex attrib binding 8, osg_MultiTexCoord5
State's vertex attrib binding 9, osg_MultiTexCoord6
State's vertex attrib binding 10, osg_MultiTexCoord7
State's vertex attrib binding 1, osg_Normal
State's vertex attrib binding 11, osg_SecondaryColor
State's vertex attrib binding 0, osg_Vertex
Program "" link succeeded, infolog:
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord7' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord5' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_SecondaryColor' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord1' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord6' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_FogCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_Color' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord4' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord2' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord3' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'osg_MultiTexCoord0' to match BindAttributeLocation request.

	Uniform "osg_ModelViewProjectionMatrix" loc=0 size=1 type=mat4
	Uniform "osg_NormalMatrix" loc=4 size=1 type=mat3
	Uniform "ecLightDir" loc=7 size=1 type=vec3
	Attrib "osg_Vertex" loc=0 size=1
	Attrib "osg_Normal" loc=1 size=1

GLBufferObjectSet::GLBufferObjectSet _profile._size=7072
GLBufferObjectSet::GLBufferObjectSet _profile._size=1196
GLBufferObjectSet::GLBufferObjectSet _profile._size=592
GLBufferObjectSet::GLBufferObjectSet _profile._size=56
OpenGL extension '' is not supported.
RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x103017cc0
Setting up osg::Camera::FRAME_BUFFER
Warning: Material::apply(State&) - not supported.
glValidateProgram FAILED "" id=3 contextID=0
infolog:
Validation Failed: No vertex array object bound.


Warning: Material::apply(State&) - not supported.
Warning: Material::apply(State&) - not supported.
Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..)
ShaderComposer::~ShaderComposer() 0x1030188b0
OpenGL extension '' is not supported.
RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x103019830
Setting up osg::Camera::FRAME_BUFFER
Warning: Material::apply(State&) - not supported.
glValidateProgram FAILED "" id=3 contextID=0
infolog:
Validation Failed: No vertex array object bound.



 

Cheers,
Remo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68430#68430








More information about the osg-users mailing list