scg3  0.6
BumpMapCore.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2014 Volker Ahlers
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */
24 
25 #ifndef BUMPMAPCORE_H_
26 #define BUMPMAPCORE_H_
27 
28 #include "scg_internals.h"
29 #include "Texture2DCore.h"
30 
31 namespace scg {
32 
33 
37 class BumpMapCore: public Texture2DCore {
38 
39 public:
40 
44  BumpMapCore();
45 
49  virtual ~BumpMapCore();
50 
54  static BumpMapCoreSP create();
55 
72  void setNormalMap(GLsizei width, GLsizei height, const unsigned char* rgbaData,
73  GLenum wrapModeS, GLenum wrapModeT, GLenum minFilter, GLenum magFilter);
74 
79  virtual void render(RenderState* renderState);
80 
85  virtual void renderPost(RenderState* renderState);
86 
87 protected:
88 
89  GLuint texNormal_;
91 
92 };
93 
94 
95 } /* namespace scg */
96 
97 #endif /* BUMPMAPCORE_H_ */
static BumpMapCoreSP create()
virtual void renderPost(RenderState *renderState)
2D texture core.
Definition: Texture2DCore.h:39
2D texture core.
void setNormalMap(GLsizei width, GLsizei height, const unsigned char *rgbaData, GLenum wrapModeS, GLenum wrapModeT, GLenum minFilter, GLenum magFilter)
The central render state that collects information about the current shader, transformations,...
Definition: RenderState.h:107
virtual void render(RenderState *renderState)
2D bump map core storing a texture (optional) and a normal map.
Definition: BumpMapCore.h:37
Definition: Animation.h:28
virtual ~BumpMapCore()
Internal definitions required by most classes.