Post your game screenshots for C&C and/or promotional purposes here.
Thread 1: viewtopic.php?f=78&t=60987
#--------------------------------------------------------------------------
# * Initialise
#--------------------------------------------------------------------------
# Set how vertex data is read by shader
shader_material.SetAttributeIndex( "vertex_position", 0 )
shader_material.SetAttributeIndex( "vertex_colour", 1 )
# Make mesh in memory [ x, y, r, g, b ]
cpu_mesh = [ -0.5, -0.5, 1.0, 0.0, 0.0,
0.5, -0.5, 1.0, 1.0, 0.0,
0.5, 0.5, 0.0, 1.0, 0.0,
-0.5, 0.5, 0.0, 0.0, 1.0 ]
# Upload mesh to GPU memory as Vertex Buffer Object
gpu_mesh = VertexBuffer.Alloc
gpu_mesh.UploadVertexArray( cpu_mesh )
gpu_mesh.DescribeBuffer( 4, [2, 3] ) # 4 vertices with 2 positions and 3 colours
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
# Activate shader
shader_material.UseProgram
# Render VBO as a triangle fan
gpu_mesh.DrawArrays( VertexBuffer::DRAW_TRIANGLE_FAN )
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
# Destroy vertex memory on GPU
gpu_mesh.Dealloc
BizarreMonkey":21t15yho said:And now... we quake.
THE MIRTHFUL IMPETUS OF AWESOME GAEM HAS COME!
It only supports shaders, I have made it so you are forced to use programmable pipeline OpenGL.rey meustrus":2zx8moml said:@Xilef: That is genuinely exciting! So is the API loaded from Win32 or something? Are you thinking about supporting shaders?