summary refs log tree commit diff stats
path: root/libs/cocos2d/cocos2d.h
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-08-09 15:19:17 -0400
committerStarla Insigna <starla4444@gmail.com>2011-08-09 15:19:17 -0400
commit1ed37fda409479769c8d110aa22d5dadc9d2cb85 (patch)
treec3677d7d6c56d66bb02fd8a1461ef2a8bf1d243f /libs/cocos2d/cocos2d.h
parent1d9ed882de4e2e3a53cdd5e90edc25e8ae10af1b (diff)
downloadcartcollect-1ed37fda409479769c8d110aa22d5dadc9d2cb85.tar.gz
cartcollect-1ed37fda409479769c8d110aa22d5dadc9d2cb85.tar.bz2
cartcollect-1ed37fda409479769c8d110aa22d5dadc9d2cb85.zip
Disabled autorotation
Interesting to note is that, for some reason, the code is calling Landscape Left "Landscape Right". This worries me and makes me think that either I'm not quite sure about the names of the orientations, or that my code is doing something weird.

Fixes #194
Diffstat (limited to 'libs/cocos2d/cocos2d.h')
0 files changed, 0 insertions, 0 deletions
bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef SHADER_H_25115B63
#define SHADER_H_25115B63

#include <string>
#include <stdexcept>
#include "gl.h"
#include "wrappers.h"

class gl_error : public std::logic_error {
public:

  gl_error(
    const char* msg,
    std::string info) :
      std::logic_error(msg),
      info_(std::move(info))
  {
  }

  gl_error(
    std::string& msg,
    std::string info) :
      std::logic_error(msg),
      info_(std::move(info))
  {
  }

  inline const std::string& getInfo() const
  {
    return info_;
  }

private:

  std::string info_;
};

class Shader {
public:

  Shader(std::string name);

  inline void use()
  {
    glUseProgram(program_.getId());
  }

  inline GLint getUniformLocation(const GLchar* name)
  {
    return glGetUniformLocation(program_.getId(), name);
  }

private:

  GLProgram program_;
};

#endif /* end of include guard: SHADER_H_25115B63 */