Provide better encapsulation for Shader member variables

Trac 19900 Issue=291 Moved a bunch of member variables from 'protected' to 'private' Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@989 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f861b02c
// //
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -506,9 +506,10 @@ int VertexShader::getSemanticIndex(const std::string &attributeName) ...@@ -506,9 +506,10 @@ int VertexShader::getSemanticIndex(const std::string &attributeName)
void VertexShader::parseAttributes() void VertexShader::parseAttributes()
{ {
if (mHlsl) const char *hlsl = getHLSL();
if (hlsl)
{ {
const char *input = strstr(mHlsl, "// Attributes") + 14; const char *input = strstr(hlsl, "// Attributes") + 14;
while(true) while(true)
{ {
......
// //
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -74,8 +74,6 @@ class Shader ...@@ -74,8 +74,6 @@ class Shader
static void releaseCompiler(); static void releaseCompiler();
protected: protected:
DISALLOW_COPY_AND_ASSIGN(Shader);
void parseVaryings(); void parseVaryings();
void compileToHLSL(void *compiler); void compileToHLSL(void *compiler);
...@@ -85,14 +83,6 @@ class Shader ...@@ -85,14 +83,6 @@ class Shader
static GLenum parseType(const std::string &type); static GLenum parseType(const std::string &type);
static bool compareVarying(const Varying &x, const Varying &y); static bool compareVarying(const Varying &x, const Varying &y);
const GLuint mHandle;
unsigned int mRefCount; // Number of program objects this shader is attached to
bool mDeleteStatus; // Flag to indicate that the shader can be deleted when no longer in use
char *mSource;
char *mHlsl;
char *mInfoLog;
VaryingList varyings; VaryingList varyings;
bool mUsesFragCoord; bool mUsesFragCoord;
...@@ -100,10 +90,21 @@ class Shader ...@@ -100,10 +90,21 @@ class Shader
bool mUsesPointSize; bool mUsesPointSize;
bool mUsesPointCoord; bool mUsesPointCoord;
ResourceManager *mResourceManager;
static void *mFragmentCompiler; static void *mFragmentCompiler;
static void *mVertexCompiler; static void *mVertexCompiler;
private:
DISALLOW_COPY_AND_ASSIGN(Shader);
const GLuint mHandle;
unsigned int mRefCount; // Number of program objects this shader is attached to
bool mDeleteStatus; // Flag to indicate that the shader can be deleted when no longer in use
char *mSource;
char *mHlsl;
char *mInfoLog;
ResourceManager *mResourceManager;
}; };
struct Attribute struct Attribute
......
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