wined3d: Allow drawPrim to create and use the GLSL program.
This commit is contained in:
parent
b67cda248d
commit
d5d4568450
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue