< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_renderer library

Description

gh_renderer is the module that talks directly with the graphics hardware.


Number of functions: 51

  1. gh_renderer.set_vsync (Lua - Python)
  2. gh_renderer.point (Lua - Python)
  3. gh_renderer.wireframe (Lua - Python)
  4. gh_renderer.solid (Lua - Python)
  5. gh_renderer.is_opengl_es (Lua - Python)
  6. gh_renderer.get_opengl_error (Lua - Python)
  7. gh_renderer.get_capability_4i (Lua - Python)
  8. gh_renderer.enable_state (Lua - Python)
  9. gh_renderer.disable_state (Lua - Python)
  10. gh_renderer.set_viewport (Lua - Python)
  11. gh_renderer.set_scissor (Lua - Python)
  12. gh_renderer.set_viewport_scissor (Lua - Python)
  13. gh_renderer.set_scissor_state (Lua - Python)
  14. gh_renderer.clear_color_buffer (Lua - Python)
  15. gh_renderer.clear_depth_buffer (Lua - Python)
  16. gh_renderer.clear_color_depth_buffers (Lua - Python)
  17. gh_renderer.set_depth_test_state (Lua - Python)
  18. gh_renderer.set_depth_test_func (Lua - Python)
  19. gh_renderer.rasterizer_set_cull_state (Lua - Python)
  20. gh_renderer.rasterizer_set_cull_face (Lua - Python)
  21. gh_renderer.rasterizer_set_polygon_mode (Lua - Python)
  22. gh_renderer.rasterizer_apply_states (Lua - Python)
  23. gh_renderer.set_blending_state (Lua - Python)
  24. gh_renderer.set_blending_factors (Lua - Python)
  25. gh_renderer.draw_primitives (Lua - Python)
  26. gh_renderer.update_fixed_mvp_matrices (Lua - Python)
  27. gh_renderer.get_api_version_major (Lua - Python)
  28. gh_renderer.get_api_version_minor (Lua - Python)
  29. gh_renderer.get_api_version (Lua - Python)
  30. gh_renderer.get_renderer_model (Lua - Python)
  31. gh_renderer.get_renderer_vendor (Lua - Python)
  32. gh_renderer.get_shading_language_version (Lua - Python)
  33. gh_renderer.get_num_opengl_extensions (Lua - Python)
  34. gh_renderer.get_opengl_extension (Lua - Python)
  35. gh_renderer.check_opengl_extension (Lua - Python)
  36. gh_renderer.set_texture2d_state (Lua - Python)
  37. gh_renderer.display_progress_bar (Lua - Python)
  38. gh_renderer.set_virtual_screen (Lua - Python)
  39. gh_renderer.get_virtual_screen (Lua - Python)
  40. gh_renderer.get_num_virtual_screens (Lua - Python)
  41. gh_renderer.update_virtual_screen (Lua - Python)
  42. gh_renderer.memory_barrier (Lua - Python)
  43. gh_renderer.shader_thread_group_get_properties_nv (Lua - Python)
  44. gh_renderer.conservative_rasterization_get_properties_nv (Lua - Python)
  45. gh_renderer.conservative_rasterization_get_properties_nv (Lua - Python)
  46. gh_renderer.glx_get_server_num_extensions (Lua - Python)
  47. gh_renderer.glx_get_server_extension (Lua - Python)
  48. gh_renderer.glx_get_client_num_extensions (Lua - Python)
  49. gh_renderer.glx_get_client_extension (Lua - Python)
  50. gh_renderer.glx_get_renderer_info_int (Lua - Python)
  51. gh_renderer.glx_get_renderer_info_str (Lua - Python)



set_vsync

Description

Enables or disables the vertical synchronization.


Syntax

gh_renderer.set_vsync(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_vsync(0)
            


point

Description

Enables the POINT rendering mode.


Syntax

gh_renderer.point()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.point()
            


wireframe

Description

Enables the WIREFRAME (or LINE) rendering mode.


Syntax

gh_renderer.wireframe()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.wireframe()
            


solid

Description

Enables the SOLID rendering mode.


Syntax

gh_renderer.solid()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.solid()
            


is_opengl_es

Description

Returns 1 if OpenGL ES is used. Useful to handle shaders on different platforms.


Syntax

gh_renderer.is_opengl_es()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
is_opengl_es = gh_renderer.is_opengl_es()
            


get_opengl_error

Description

Returns the OpenGL error code or 0 if no error.


Syntax

error = gh_renderer.get_opengl_error()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
err_code = gh_renderer.get_opengl_error()
            


get_capability_4i

Description

Gets a hardware capability.


Syntax

x, y, z, w = gh_renderer.get_capability_4i(
 cap_name
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
--[[
Capabilities supported:
"GL_MAX_SUBROUTINES"
"GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS"
"GL_MAX_VERTEX_ATTRIBS"
"GL_MAX_TEXTURE_SIZE"
"GL_MAX_TEXTURE_IMAGE_UNITS"
"GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"
"GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"
"GL_MAX_ARRAY_TEXTURE_LAYERS"
"GL_MAX_COLOR_ATTACHMENTS"
"GL_MAX_DRAW_BUFFERS"
"GL_MAX_VIEWPORT_DIMS"
"GL_MAX_SAMPLES"
"GL_MAX_VERTEX_STREAMS"
"GL_MAX_GEOMETRY_SHADER_INVOCATIONS"
"GL_MAX_PATCH_VERTICES"
"GL_MAX_TESS_GEN_LEVEL"
"GL_MAX_TRANSFORM_FEEDBACK_BUFFERS"
"GL_MAX_COMPUTE_WORK_GROUP_COUNT"
"GL_MAX_COMPUTE_WORK_GROUP_SIZE"
"GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"
"GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"
"GL_MAX_FRAMEBUFFER_WIDTH"
"GL_MAX_FRAMEBUFFER_WIDTH"
"GL_MAX_FRAMEBUFFER_HEIGHT"
"GL_MAX_FRAMEBUFFER_LAYERS"
"GL_MAX_FRAMEBUFFER_SAMPLES"
"GL_MAX_WIDTH"
"GL_MAX_HEIGHT"
"GL_MAX_DEPTH"
"GL_MAX_LAYERS"
"GL_MAX_COMBINED_DIMENSIONS"
"GL_MAX_VERTEX_ATTRIB_STRIDE"
"GL_MIN_MAP_BUFFER_ALIGNMENT"
"GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT"
"GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"
"GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT"
"GL_MAX_UNIFORM_BUFFER_BINDINGS"
"GL_MAX_UNIFORM_BLOCK_SIZE"
"GL_MAX_VERTEX_UNIFORM_BLOCKS"
"GL_MAX_FRAGMENT_UNIFORM_BLOCKS"
"GL_MAX_GEOMETRY_UNIFORM_BLOCKS"
"GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS"
"GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS"
"GL_MAX_COMPUTE_UNIFORM_BLOCKS"
"GL_MAX_COMBINED_UNIFORM_BLOCKS"
"GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"
"GL_MAX_SHADER_STORAGE_BLOCK_SIZE"
"GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS"
"GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS"
"GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS"
"GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS"
"GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS"
"GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS"
"GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS"
"GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS"
"GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE"
"GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS"
"GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS"
"GL_MAX_VERTEX_ATOMIC_COUNTERS"
"GL_MAX_FRAGMENT_ATOMIC_COUNTERS"
"GL_MAX_GEOMETRY_ATOMIC_COUNTERS"
"GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS"
"GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS"
"GL_MAX_COMPUTE_ATOMIC_COUNTERS"
"GL_MAX_CULL_DISTANCES"
"GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES"
--]]

max_tex_size = gh_renderer.get_capability_4i("GL_MAX_TEXTURE_SIZE")
            


enable_state

Description

Enables a rendering state.


Syntax

gh_renderer.enable_state(
 state_name
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
--[[
States supported:
"GL_CLIP_DISTANCE0"
"GL_CLIP_DISTANCE1"
"GL_CLIP_DISTANCE2"
"GL_CLIP_DISTANCE3"
"GL_MULTISAMPLE"
"GL_CULL_FACE"
"GL_BLEND"
"GL_DEPTH_TEST"
"GL_SCISSOR_TEST"
"GL_TEXTURE_2D"
"GL_LIGHTING"
"GL_LIGHT0"
"GL_LIGHT1"
"GL_LIGHT2"
"GL_LIGHT3"
"GL_PROGRAM_POINT_SIZE"
"GL_CONSERVATIVE_RASTERIZATION_INTEL"
"GL_CONSERVATIVE_RASTERIZATION_NV"
"GL_TEXTURE_CUBE_MAP_SEAMLESS"
--]]
gh_renderer.enable_state("GL_CLIP_DISTANCE0")
            


disable_state

Description

Disables a rendering state.


Syntax

gh_renderer.disable_state(
 state_name
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
--[[
States supported:
"GL_CLIP_DISTANCE0"
"GL_CLIP_DISTANCE1"
"GL_CLIP_DISTANCE2"
"GL_CLIP_DISTANCE3"
"GL_MULTISAMPLE"
"GL_CULL_FACE"
"GL_BLEND"
"GL_DEPTH_TEST"
"GL_SCISSOR_TEST"
"GL_TEXTURE_2D"
"GL_LIGHTING"
"GL_LIGHT0"
"GL_LIGHT1"
"GL_LIGHT2"
"GL_LIGHT3"
"GL_PROGRAM_POINT_SIZE"
"GL_CONSERVATIVE_RASTERIZATION_INTEL"
"GL_CONSERVATIVE_RASTERIZATION_NV"
"GL_MULTISAMPLE"
--]]
gh_renderer.disable_state("GL_CLIP_DISTANCE0")
            


set_viewport

Description

Sets the viewport.


Syntax

gh_renderer.set_viewport(
 x, y,
 width, height
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_viewport(0, 0, width, height)
            


set_scissor

Description

Sets the scissor rectangle.


Syntax

gh_renderer.set_scissor(
 x, y,
 width, height
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_scissor(0, 0, width, height)
            


set_viewport_scissor

Description

Sets the viewport and the scissor rectangle in the same call.


Syntax

gh_renderer.set_viewport_scissor(
 x, y,
 width, height
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_viewport_scissor(0, 0, width, height)
            


set_scissor_state

Description

Enables or disable the scissor test.


Syntax

gh_renderer.set_scissor_state(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_scissor_state(1)
            


clear_color_buffer

Description

Clear the color buffer with a RGBA color.


Syntax

gh_renderer.clear_color_buffer(
 r, g, b, a
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.clear_color_buffer(0, 0, 0, 1)
            


clear_depth_buffer

Description

Clear the depth buffer.


Syntax

gh_renderer.clear_depth_buffer(
 z
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
z = 1.0
gh_renderer.clear_depth_buffer(z)
            


clear_color_depth_buffers

Description

Clear the color and depth buffers in the same call.


Syntax

gh_renderer.clear_color_depth_buffers(
 r, g, b, a,
 z
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.clear_color_depth_buffers(r, g, b, a, z)
            


set_depth_test_state

Description

Enables or disable the depth test.


Syntax

gh_renderer.set_depth_test_state(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_depth_test_state(1)
            


set_depth_test_func

Description

Sets the depth test function.


Syntax

gh_renderer.set_depth_test_func(
 func_type
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
local CMP_FUNC_LESS = 1
gh_renderer.set_depth_test_func(CMP_FUNC_LESS)
            


rasterizer_set_cull_state

Description

Enables or disable the face culling state.


Syntax

gh_renderer.rasterizer_set_cull_state(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.rasterizer_set_cull_state(1)
            


rasterizer_set_cull_face

Description

Sets the face type to be culled.


Syntax

gh_renderer.rasterizer_set_cull_face(
 face
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
local BACK_FACE = 0            
gh_renderer.rasterizer_set_cull_face(BACK_FACE)
gh_renderer.rasterizer_set_cull_state(1)
            


rasterizer_set_polygon_mode

Description

Sets the polygon rendering mode.


Syntax

gh_renderer.rasterizer_set_polygon_mode(
 face,
 mode
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
local BACK_FRONT_FACE = 2            
local LINE = 1            
gh_renderer.rasterizer_set_polygon_mode(BACK_FRONT_FACE, LINE)
            


rasterizer_apply_states

Description

Applies all states modified with gh_renderer.rasterizer_xxxx() functions.


Syntax

gh_renderer.rasterizer_apply_states()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
local BACK_FACE = 0            
gh_renderer.rasterizer_set_cull_face(BACK_FACE)
gh_renderer.rasterizer_set_cull_state(0)
local BACK_FRONT_FACE = 2            
local LINE = 1            
gh_renderer.rasterizer_set_polygon_mode(BACK_FRONT_FACE, LINE)
gh_renderer.rasterizer_apply_states()
            


set_blending_state

Description

Enables or disables the color blending.


Syntax

gh_renderer.set_blending_state(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_blending_state(1)
            


set_blending_factors

Description

Sets the source and destination blending factors.


Syntax

gh_renderer.set_blending_factors(
 src,
 dst
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

  
local BLEND_FACTOR_ONE = 1
gh_renderer.set_blending_factors(BLEND_FACTOR_ONE, BLEND_FACTOR_ONE)
gh_renderer.set_blending_state(1)
            


draw_primitives

Description

Draws primitives (POINTS, LINES, TRIANGLES, TRIANGLE_STRIP, etc.). In GeeXLab this function is essentially used with attribute-less rendering.


Syntax

gh_renderer.draw_primitives(
 primitive_type,
 count,
 start
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
PRIMITIVE_TRIANGLE = 0
PRIMITIVE_TRIANGLE_STRIP = 1
PRIMITIVE_LINE = 2
PRIMITIVE_LINE_STRIP = 3
PRIMITIVE_LINE_LOOP = 4
PRIMITIVE_POINT = 8
primitive_type = PRIMITIVE_TRIANGLE_STRIP
count = 4
start = 0
gh_renderer.draw_primitives(primitive_type, count, start)
            


update_fixed_mvp_matrices

Description

Updates the fixed modelview and projection matrices from a camera and an object. No GPU program is required for the rendering of the object.


Syntax

gh_renderer.update_fixed_mvp_matrices(
 camera_id,
 object_id
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.update_fixed_mvp_matrices(camera_id, object_id)
            


get_api_version_major

Description

Gets OpenGL major version number.


Syntax

major = gh_renderer.get_api_version_major()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glmajor = gh_renderer.get_api_version_major()
if (glmajor < 4) then
	-- Tessellation not supported
end
            


get_api_version_minor

Description

Gets OpenGL minor version number.


Syntax

minor = gh_renderer.get_api_version_minor()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glminor = gh_renderer.get_api_version_minor()
            


get_api_version

Description

Gets the OpenGL version.


Syntax

version = gh_renderer.get_api_version()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glversion = gh_renderer.get_api_version()
            


get_renderer_model

Description

Gets the model of the renderer (the name of the graphics card).


Syntax

model = gh_renderer.get_renderer_model()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glrenderer = gh_renderer.get_renderer_model()
            


get_renderer_vendor

Description

Gets the vendor of the renderer (the name of the graphics card GPU maker).


Syntax

vendor = gh_renderer.get_renderer_vendor()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glvendor = gh_renderer.get_renderer_vendor()
            


get_shading_language_version

Description

Gets the GLSL version.


Syntax

version = gh_renderer.get_shading_language_version()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
glsl_version = gh_renderer.get_shading_language_version()
            


get_num_opengl_extensions

Description

Returns the number of OpenGL extensions.


Syntax

num = gh_renderer.get_num_opengl_extensions()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
num_extensions = gh_renderer.get_num_opengl_extensions()
            


get_opengl_extension

Description

Returns the name of a particular OpenGL extension.


Syntax

name = gh_renderer.get_opengl_extension(
 index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
index = 0
gl_extension = gh_renderer.get_opengl_extension(index)
            


check_opengl_extension

Description

Checks if a particular OpenGL extension is exposed.


Syntax

name = gh_renderer.check_opengl_extension(
 extension_name
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
if (gh_renderer.check_opengl_extension("GL_ARB_compute_shader") == 1) then
  -- OpenGL 4.3 compute shaders are supported.
end
            


set_texture2d_state

Description

Enables or disable the texturing state of the fixed pipeline.


Syntax

gh_renderer.set_texture2d_state(
 state
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_texture2d_state(state)
            


display_progress_bar

Description

Renders a progress bar. The progress bar percent is set with gh_utils.set_progress_bar_percent(). Both functions can be used in an INIT script to draw a progress bar while loading data.


Syntax

gh_renderer.display_progress_bar(
 percent
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_utils.set_progress_bar_percent(20)
gh_renderer.display_progress_bar()
...
... do some stuff
...
gh_utils.set_progress_bar_percent(60)
gh_renderer.display_progress_bar()
...
... do some stuff
...
gh_utils.set_progress_bar_percent(100)
gh_renderer.display_progress_bar()

            


set_virtual_screen

Description

Sets the current virtual screen (Mac OS X only).


Syntax

gh_renderer.set_virtual_screen(
 screen
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.set_virtual_screen(screen)
            


get_virtual_screen

Description

Gets the current virtual screen (Mac OS X only).


Syntax

screen = gh_renderer.get_virtual_screen()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
screen = gh_renderer.get_virtual_screen(ac_buffer, index)
            


get_num_virtual_screens

Description

Gets the number of virtual screens (Mac OS X only).


Syntax

num_screens = gh_renderer.get_num_virtual_screens()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
num_screens = gh_renderer.get_num_virtual_screens()
            


update_virtual_screen

Description

Updates the virtual screen. Call this function after a change of virtual screen (Mac OS X only).


Syntax

gh_renderer.update_virtual_screen()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.update_virtual_screen()
            


memory_barrier

Description

Based on OpenGL glMemoryBarrier: defines a barrier ordering memory transactions.


Syntax

gh_renderer.memory_barrier(
 mask
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
mask = "GL_SHADER_STORAGE_BARRIER_BIT​  GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"            
gh_renderer.memory_barrier(mask)
            


shader_thread_group_get_properties_nv

Description

OpenGL / NVIDIA GPUs - returns GPU architecture details. Based on OpenGL GL_NV_shader_thread_group extension.


Syntax

warp_size, , warp_per_sm, sm_count = gh_renderer.shader_thread_group_get_properties_nv()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
warp_size, warp_per_sm, sm_count = gh_renderer.shader_thread_group_get_properties_nv()
            


conservative_rasterization_get_properties_nv

Description

OpenGL / NVIDIA GPUs - returns properties related to conservative rasterization. See the GL_NV_conservative_raster extension for more details.


Syntax

bias_xbits, bias_ybits, max_bias_bits = gh_renderer.conservative_rasterization_get_properties_nv()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
bias_xbits, bias_ybits, max_bias_bits = gh_renderer.conservative_rasterization_get_properties_nv()
            


conservative_rasterization_get_properties_nv

Description

OpenGL / NVIDIA GPUs - sets conservative rasterization params. See the GL_NV_conservative_raster extension for more details.


Syntax

gh_renderer.conservative_rasterization_get_properties_nv(
 bias_xbits, bias_ybits
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_renderer.conservative_rasterization_set_sub_pixel_precision_bias_nv(bias_xbits, bias_ybits)
            


glx_get_server_num_extensions

Description

OpenGL / Linux - gets the number of GLX server extensions.


Syntax

n = gh_renderer.glx_get_server_num_extensions()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
n = gh_renderer.glx_get_server_num_extensions()
            


glx_get_server_extension

Description

OpenGL / Linux - gets the name of a particular GLX server extension.


Syntax

name = gh_renderer.glx_get_server_extension(
 index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
name = gh_renderer.glx_get_server_extension(index)
            


glx_get_client_num_extensions

Description

OpenGL / Linux - gets the number of GLX client extensions.


Syntax

n = gh_renderer.glx_get_client_num_extensions()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
n = gh_renderer.glx_get_client_num_extensions()
            


glx_get_client_extension

Description

OpenGL / Linux - gets the name of a particular GLX client extension.


Syntax

name = gh_renderer.glx_get_client_extension(
 index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
name = gh_renderer.glx_get_client_extension(index)
            


glx_get_renderer_info_int

Description

OpenGL / Linux - gets a GLX attribute value.


Syntax

x = gh_renderer.glx_get_renderer_info_int(
 attribute
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
-- Attribute types
GLX_RENDERER_ATTRIBUTE_INFO_GLX_VERSION_MAJOR = 5
GLX_RENDERER_ATTRIBUTE_INFO_GLX_VERSION_MINOR = 6
GLX_RENDERER_ATTRIBUTE_INFO_VENDOR_ID = 7
GLX_RENDERER_ATTRIBUTE_INFO_DEVICE_ID = 8
GLX_RENDERER_ATTRIBUTE_INFO_VERSION_MAJOR = 9
GLX_RENDERER_ATTRIBUTE_INFO_VERSION_MINOR = 10
GLX_RENDERER_ATTRIBUTE_INFO_VERSION_PATCH = 11
GLX_RENDERER_ATTRIBUTE_INFO_ACCELERATED = 12
GLX_RENDERER_ATTRIBUTE_INFO_VIDEO_MEMORY = 13
GLX_RENDERER_ATTRIBUTE_INFO_UMA = 14

attribute = GLX_RENDERER_ATTRIBUTE_INFO_VENDOR_ID            

x = gh_renderer.glx_get_renderer_info_int(attribute)
            


glx_get_renderer_info_str

Description

OpenGL / Linux - gets a GLX attribute value.


Syntax

str = gh_renderer.glx_get_renderer_info_str(
 attribute
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
-- Attribute types
GLX_RENDERER_ATTRIBUTE_INFO_SVR_VENDOR_STR = 1
GLX_RENDERER_ATTRIBUTE_INFO_SVR_VERSION_STR = 2
GLX_RENDERER_ATTRIBUTE_INFO_CLIENT_VENDOR_STR = 3
GLX_RENDERER_ATTRIBUTE_INFO_CLIENT_VERSION_STR = 4

attribute = GLX_RENDERER_ATTRIBUTE_INFO_SVR_VENDOR_STR            

str = gh_renderer.glx_get_renderer_info_str(attribute)
            






GeeXLab Rootard Guide | Downloads | Contact | Newsletter