void ogle_verify_com_buf(OpenGLEmuState* s,GLEMUBufferState state); VertexDescriptor ogle_create_default_vert_desc(); DepthStencilDescription ogle_create_def_depth_stencil_desc(); DepthStencilState ogle_create_def_depth_state(OpenGLEmuState* s); GLProgram* ogle_get_prog_ptr(OpenGLEmuState*s,GLProgramKey key); GLProgram ogle_add_prog_source(OpenGLEmuState* s,const char* v_s,const char* vs_name,const char* f_s,const char* fs_name,VertexDescriptor vd); GLProgram ogle_add_prog_lib(OpenGLEmuState*s,const char* vs_name,const char* fs_name,VertexDescriptor vd); SamplerDescriptor ogle_get_def_sampler_desc(OpenGLEmuState* s); void ogle_create_cpu_buf_bind(OpenGLEmuState*s,uint64_t bindkey,memory_index size); GLTexture ogle_tex_image_2d_with_sampler(OpenGLEmuState*s,void* texels,float2 dim,PixelFormat format,SamplerDescriptor sd,TextureUsage usage); GLTexture ogle_tex_image_2d(OpenGLEmuState*s,void* texels,float2 dim,PixelFormat format,TextureUsage usage); void ogle_api_init(OpenGLEmuState* s); void ogle_init(OpenGLEmuState* s); bool ogle_is_valid_texture(OpenGLEmuState*s,GLTexture texture); void ogle_purge_textures(OpenGLEmuState* s); SamplerState ogle_get_sample_state(SamplerDescriptor desc); UniformBindingTableEntry ogle_get_uniform_entry_for_draw(OpenGLEmuState*s,uint32_t index); SamplerDescriptor ogle_get_sampler_desc(OpenGLEmuState*s); SamplerState ogle_get_def_sampler(OpenGLEmuState*s); //Depth and Stencil DepthStencilDescription ogle_get_def_depth_Sten_desc(OpenGLEmuState* s); DepthStencilState ogle_get_depth_sten_state(OpenGLEmuState*s,DepthStencilDescription desc); //framebuffer/Rendertargets u64 ogle_gen_framebuffer(OpenGLEmuState* s); void ogle_fb_tex2d_color(OpenGLEmuState* s,u64 id,u32 index,GLTexture texture,u32 mipmap_level,LoadAction l = LoadActionLoad,StoreAction st = StoreActionStore); void ogle_fb_tex2d_depth(OpenGLEmuState* s,u64 id,GLTexture texture,u32 mipmap_level,LoadAction l = LoadActionLoad,StoreAction st = StoreActionStore); void ogle_fb_tex2d_stencil(OpenGLEmuState* s,u64 id,GLTexture texture,u32 mipmap_level,LoadAction l = LoadActionLoad,StoreAction st = StoreActionStore); void ogle_bind_framebuffer(OpenGLEmuState* s,u64 id); //Buffers GPUBuffer ogle_gen_buffer(OpenGLEmuState*s,u64 size,ResourceOptions options); void ogle_buffer_data_named(OpenGLEmuState* s,u64 size,GPUBuffer* buffer,void* data); void ogle_create_buffer(OpenGLEmuState*s,uint64_t bindkey); void ogle_add_buffer_binding(OpenGLEmuState*s,uint64_t buffer_key,uint64_t key); TripleGPUBuffer* ogle_get_buffer_binding(OpenGLEmuState*s,uint64_t bindkey); YoyoVector ogle_get_buf_list(OpenGLEmuState*s); YoyoVector ogle_get_program_list(OpenGLEmuState*s); YoyoVector ogle_get_texture_list(OpenGLEmuState*s); void ogle_bind_texture_frag(OpenGLEmuState*s,GLTexture texture,uint32_t tex_index); void ogle_bind_texture_frag_sampler(OpenGLEmuState*s,GLTexture texture,uint32_t tex_index,uint32_t sampler_index); void ogle_bind_buffer(OpenGLEmuState*s,uint64_t bind_key,uint64_t index,uint64_t offset); void ogle_bind_buffer_raw(OpenGLEmuState* s,u64 bk,u64 i,u64 o); void ogle_create_buffer(OpenGLEmuState*s,uint64_t bindkey,memory_index size); void ogle_bind_cpubuffer(OpenGLEmuState* s,uint64_t buffer_key,uint64_t key); CPUBuffer* ogle_cpubuffer_at_binding(OpenGLEmuState*s,uint64_t bindkey); YoyoVector ogle_get_cpubuffer_list(OpenGLEmuState*s); UniformBindResult ogle_add_uniform_data_at_binding(OpenGLEmuState*s,uint64_t bindkey,void* uniform_data,memory_index size); BufferOffsetResult ogle_get_uniform_at_binding(OpenGLEmuState*s,uint64_t bindkey,uint32_t index); GLProgram ogle_get_def_program(OpenGLEmuState*s); GLProgram ogle_get_program(OpenGLEmuState*s,GLProgramKey key); uint32_t ogle_get_depth_sten_state_count(OpenGLEmuState*s); DepthStencilDescription ogle_get_current_depth_sten_state(OpenGLEmuState*s); uint32_t ogle_get_current_stencil_ref_value(OpenGLEmuState*s); UniformBindResult ogle_add_uniform_data(OpenGLEmuState* s,uint32_t buffer_binding,uint32_t data_index,GLProgram* p,uint32_t size); void* ogle_frag_set_uniform_(OpenGLEmuState*s,memory_index size,u32 index); void* ogle_vert_set_uniform_(OpenGLEmuState*s,memory_index size,u32 index); uint32_t ogle_add_draw_call_entry(OpenGLEmuState*s,BufferOffsetResult v_uni_bind,BufferOffsetResult f_uni_bind,BufferOffsetResult tex_binds,u32 v_uni_bind_index,u32 f_uni_bind_index); void ogle_end_draw(OpenGLEmuState*s,uint32_t unit_size); void ogle_pre_frame_setup(OpenGLEmuState*s); void ogle_blend(OpenGLEmuState*s,uint64_t gl_src,uint64_t gl_dst); void ogle_blend_i(OpenGLEmuState*s,u32 i,uint64_t gl_src,uint64_t gl_dst); void ogle_use_program(OpenGLEmuState*s,GLProgram gl_program); void ogle_enable_scissor_test(OpenGLEmuState*s); void ogle_disable_scissor_test(OpenGLEmuState*s); void ogle_scissor_test(OpenGLEmuState*s,int x,int y,int width,int height); void ogle_scissor_test_f4(OpenGLEmuState*s,float4 rect); void ogle_viewport(OpenGLEmuState*s,int x, int y, int width, int height); void ogle_viewport_f4(OpenGLEmuState*s,float4 vp); void ogl_bind_framebuffer_start(OpenGLEmuState*s,GLTexture texture); void ogle_bind_framebuffer_end(OpenGLEmuState*s); //depth void ogle_enable_depth_test(OpenGLEmuState*s); void ogle_disable_depth_test(OpenGLEmuState*s); void ogle_depth_func(OpenGLEmuState* s,CompareFunc func); //stencil void ogle_enable_stencil_test(OpenGLEmuState*s); void ogle_disable_stencil_test(OpenGLEmuState*s); void ogle_stencil_mask(OpenGLEmuState*s,uint32_t mask); void ogle_stencil_mask_sep(OpenGLEmuState*s,uint32_t front_or_back,uint32_t mask); void ogle_stencil_func(OpenGLEmuState*s,CompareFunc func,uint32_t ref,uint32_t mask); void ogle_stencil_func_sep(OpenGLEmuState*s,uint32_t front_or_back,CompareFunc func,uint32_t ref,uint32_t mask); void ogle_stencil_op(OpenGLEmuState*s,StencilOp sten_fail,StencilOp dpfail,StencilOp dppass); void ogle_stencil_op_sep(OpenGLEmuState*s,uint32_t front_or_back,StencilOp sten_fail,StencilOp dpfail,StencilOp dppass); void ogle_stencil_func_and_op(OpenGLEmuState*s,CompareFunc func,uint32_t ref,uint32_t mask,StencilOp sten_fail,StencilOp dpfail,StencilOp dppass); void ogle_stencil_Func_and_op_sep(OpenGLEmuState*s,uint32_t front_or_back,CompareFunc func,uint32_t ref,uint32_t mask,StencilOp sten_fail,StencilOp dpfail,StencilOp dppass); void ogle_clear_buffer(OpenGLEmuState*s,uint32_t buffer_bits); void ogle_clear_color_target(OpenGLEmuState*s,uint32_t index); void ogle_clear_depth(OpenGLEmuState*s,uint32_t value); void ogle_clear_stencil(OpenGLEmuState*s,uint32_t value); void ogle_clear_color(OpenGLEmuState*s,float4 value); void ogle_clear_color_and_stencil(OpenGLEmuState*s,float4 color,uint32_t stencil); //Debug calls void ogle_add_debug_signpost(OpenGLEmuState*s,char* str); void ogle_draw_arrays(OpenGLEmuState*s,uint32_t current_count,uint32_t unit_size); void ogle_draw_array_primitives(OpenGLEmuState*s,uint32_t current_count,uint32_t unit_size); void ogle_draw_elements(OpenGLEmuState*s,uint32_t count,uint32_t index_type,u64 element_buffer_id,u64 element_offset); void ogle_execute(OpenGLEmuState*s,void* pass_in_c_buffer,bool enqueue,bool commit,bool present); void ogle_execute_commit(OpenGLEmuState*s,void* pass_in_c_buffer,bool present); void ogle_execute_enqueue(OpenGLEmuState*s,void* pass_in_c_buffer); void ogle_execute_passthrough(OpenGLEmuState*s,void* pass_in_c_buffer);