VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c@ 29359

Last change on this file since 29359 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: server_glsl.c 28800 2010-04-27 08:22:32Z vboxsync $ */
2
3/** @file
4 * VBox OpenGL: GLSL related fucntions
5 */
6
7/*
8 * Copyright (C) 2009 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#include "cr_spu.h"
20#include "chromium.h"
21#include "cr_error.h"
22#include "cr_mem.h"
23#include "cr_net.h"
24#include "server_dispatch.h"
25#include "server.h"
26
27#ifdef CR_OPENGL_VERSION_2_0
28
29void SERVER_DISPATCH_APIENTRY crServerDispatchShaderSource(GLuint shader, GLsizei count, const char ** string, const GLint * length)
30{
31 /*@todo?crStateShaderSource(shader...);*/
32 cr_server.head_spu->dispatch_table.ShaderSource(crStateGetShaderHWID(shader), count, string, length);
33}
34
35void SERVER_DISPATCH_APIENTRY crServerDispatchCompileShader(GLuint shader)
36{
37 crStateCompileShader(shader);
38 cr_server.head_spu->dispatch_table.CompileShader(crStateGetShaderHWID(shader));
39}
40
41void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteShader(GLuint shader)
42{
43 crStateDeleteShader(shader);
44 cr_server.head_spu->dispatch_table.DeleteShader(crStateGetShaderHWID(shader));
45}
46
47void SERVER_DISPATCH_APIENTRY crServerDispatchAttachShader(GLuint program, GLuint shader)
48{
49 crStateAttachShader(program, shader);
50 cr_server.head_spu->dispatch_table.AttachShader(crStateGetProgramHWID(program), crStateGetShaderHWID(shader));
51}
52
53void SERVER_DISPATCH_APIENTRY crServerDispatchDetachShader(GLuint program, GLuint shader)
54{
55 crStateDetachShader(program, shader);
56 cr_server.head_spu->dispatch_table.DetachShader(crStateGetProgramHWID(program), crStateGetShaderHWID(shader));
57}
58
59void SERVER_DISPATCH_APIENTRY crServerDispatchLinkProgram(GLuint program)
60{
61 crStateLinkProgram(program);
62 cr_server.head_spu->dispatch_table.LinkProgram(crStateGetProgramHWID(program));
63}
64
65void SERVER_DISPATCH_APIENTRY crServerDispatchUseProgram(GLuint program)
66{
67 crStateUseProgram(program);
68 cr_server.head_spu->dispatch_table.UseProgram(crStateGetProgramHWID(program));
69}
70
71void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteProgram(GLuint program)
72{
73 crStateDeleteProgram(program);
74 cr_server.head_spu->dispatch_table.DeleteProgram(crStateGetProgramHWID(program));
75}
76
77void SERVER_DISPATCH_APIENTRY crServerDispatchValidateProgram(GLuint program)
78{
79 crStateValidateProgram(program);
80 cr_server.head_spu->dispatch_table.ValidateProgram(crStateGetProgramHWID(program));
81}
82
83void SERVER_DISPATCH_APIENTRY crServerDispatchBindAttribLocation(GLuint program, GLuint index, const char * name)
84{
85 crStateBindAttribLocation(program, index, name);
86 cr_server.head_spu->dispatch_table.BindAttribLocation(crStateGetProgramHWID(program), index, name);
87}
88
89void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteObjectARB(GLhandleARB obj)
90{
91 GLuint hwid = crStateGetProgramHWID(obj);
92
93 if (!hwid)
94 {
95 hwid = crStateGetShaderHWID(obj);
96 crStateDeleteShader(obj);
97 }
98 else
99 {
100 crStateDeleteProgram(obj);
101 }
102
103 cr_server.head_spu->dispatch_table.DeleteObjectARB(hwid);
104}
105
106#endif /* #ifdef CR_OPENGL_VERSION_2_0 */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette