check video card abilities

hello,

how can i check my videocard for alpha blending support?

on my pc i can set e.g. images semi-transparent with setAlphaScale(.5).
but when i try to check this out at my friends computer, i won’t be shown, till alpha is 1.
it would be nice first to check the videocard for its ability to alphablend. if card doesn’t support it, don’t do any alphablending, else just do it.

greets

You can manually check your graphics card settings by putting “notify-level-glgsg spam” in your Config.prc file.
Alternatively, you can use the GraphicsStateGuardian class to check them programatically. Here’s a function to list everything:

gsg=base.win.getGsg()
print "alpha_scale_via_texture",bool(gsg.getAlphaScaleViaTexture())
print "color_scale_via_lighting",bool(gsg.getColorScaleViaLighting())
print "copy_texture_inverted",bool(gsg.getCopyTextureInverted())
print "max_3d_texture_dimension",gsg.getMax3dTextureDimension()
print "max_clip_planes",gsg.getMaxClipPlanes()
print "max_cube_map_dimension",gsg.getMaxCubeMapDimension()
print "max_lights",gsg.getMaxLights()
print "max_texture_dimension",gsg.getMaxTextureDimension()
print "max_texture_stages",gsg.getMaxTextureStages()
print "max_vertex_transform_indices", gsg.getMaxVertexTransformIndices()
print "max_vertex_transforms",gsg.getMaxVertexTransforms()
print "shader_model",gsg.getShaderModel()
print "supports_3d_texture",bool(gsg.getSupports3dTexture())
print "supports_basic_shaders",bool(gsg.getSupportsBasicShaders())
print "supports_compressed_texture", bool(gsg.getSupportsCompressedTexture())
print "supports_cube_map",bool(gsg.getSupportsCubeMap())
print "supports_depth_stencil",bool(gsg.getSupportsDepthStencil())
print "supports_depth_texture", bool(gsg.getSupportsDepthTexture())
print "supports_generate_mipmap", bool(gsg.getSupportsGenerateMipmap())
print "supports_render_texture",bool(gsg.getSupportsRenderTexture())
print "supports_shadow_filter",bool(gsg.getSupportsShadowFilter())
print "supports_tex_non_pow2",bool(gsg.getSupportsTexNonPow2())
print "supports_texture_combine",bool(gsg.getSupportsTextureCombine())
print "supports_texture_dot3",bool(gsg.getSupportsTextureDot3())
print "supports_texture_saved_result", bool(gsg.getSupportsTextureSavedResult())
print "supports_two_sided_stencil", bool(gsg.getSupportsTwoSidedStencil())
print "max_vertices_per_array",gsg.getMaxVerticesPerArray()
print "max_vertices_per_primitive",gsg.getMaxVerticesPerPrimitive()
print "supported_geom_rendering",gsg.getSupportedGeomRendering()
print "supports_multisample",bool(gsg.getSupportsMultisample())
print "supports_occlusion_query",bool(gsg.getSupportsOcclusionQuery())
print "prefers_triangle_strips",bool(gsg.prefersTriangleStrips())

Maybe the property you requested is listed, maybe not. You should check it yourself.

thanks!
alpha_scale_via_texture is “true” on both computers, so that seems not to be the flag i’m looking for.
do you have any ideas which flag could be the right one (alphablending)?

greets

FWIW, I don’t think there are any computers that don’t support alpha blending. That’s pretty basic functionality.

Right, every 3-D card can do alpha blending. Has been that way since the 90’s.

Whatever’s going on with your friend’s computer can’t be related to the graphics card’s capabilities. There must be something else wrong. From your description, I don’t have enough information to speculate on what the actual problem might be.

David