Commit d5d45684 authored by Jason Green's avatar Jason Green Committed by Alexandre Julliard

wined3d: Allow drawPrim to create and use the GLSL program.

parent b67cda24
......@@ -1920,7 +1920,20 @@ UINT numberOfvertices, UINT numberOfIndicies, GLenum glPrimType, const void *idx
TRACE("Loaded arrays\n");
/* TODO: Bind the correct GLSL shader program here. */
/* Bind the correct GLSL shader program based on the currently set vertex & pixel shaders. */
if (wined3d_settings.shader_mode == SHADER_GLSL) {
GLhandleARB programId;
set_glsl_shader_program(iface);
programId = This->stateBlock->shaderPrgId;
if (programId != 0) {
/* Start using this program ID */
TRACE_(d3d_shader)("Using GLSL program %u\n", programId);
GL_EXTCALL(glUseProgramObjectARB(programId));
checkGLcall("glUseProgramObjectARB");
}
}
if (useVertexShaderFunction) {
......
......@@ -1317,6 +1317,9 @@ extern const SHADER_OPCODE* shader_get_opcode(
/* ARB shader program Prototypes */
extern void shader_hw_def(SHADER_OPCODE_ARG *arg);
/* GLSL helper programs */
extern void set_glsl_shader_program(IWineD3DDevice *iface);
/** The following translate DirectX pixel/vertex shader opcodes to GLSL lines */
extern void shader_glsl_map2gl(SHADER_OPCODE_ARG* arg);
extern void shader_glsl_arith(SHADER_OPCODE_ARG* arg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment