35 #include <OpenGLFramework/RenderingContext/glfPBuffer.hh>
36 #include <OpenGLFramework/SpecializedBatches/TemplateSpecializedBatch.hh>
37 #include <OpenGLFramework/Base/glfException.hh>
38 #include <OpenGLFramework/Base/glfFramebufferObject.hh>
39 #include <OpenGLFramework/Base/glfTexture2D.hh>
42 #include <Utils/Param.hh>
43 #include <Utils/IOUtils.hh>
44 #include <Base/Image/ImageIO.hh>
45 #include <Base/Image/Image.hh>
46 #include <Image/Camera.hh>
49 #include <Gui/biasgl.h>
56 int main(
int argc,
char* argv[])
61 "filename of a BIAS readable unsigned char image",
"");
63 "name of the output permutated mip image",
"");
65 if(!IOUtils::ParseCommandLineEvalHelp(params, argc, argv) )
70 if(!IOUtils::LoadCamera(camName, cam)) {
115 resultTexture.
Allocate(width, height, GL_RGB);
123 tsb.
Init(TemplateSpecializedBatch::myProcessingScheme);
134 IOUtils::SaveCamera(*outName, resultImg);
void Allocate(int width, int height, GLenum internalFormat, int mipmap=0)
Creates a texture with undefined content.
void AttachTexture(const glfTexture &texture, GLenum attachmentPoint, int attachedMipMapLevel=0, int zSlice=0, GLenum cubeMapSide=0)
Attaches a texture to an attachment point which can be.
This file contains the header for a class template.
void Create()
Creates the texture but does not upload any data yet.
void CopyToImage(ImageBase &image, int mipmap=0)
Copies the pixels of a mipmap of the texture to a BIAS::ImageBase.
Exception class used for run-time errors in the OpenGLFramework.
unsigned int GetWidth() const
void SetViewport(unsigned int viewportWidth, unsigned int viewportHeight, unsigned int viewportOx=0, unsigned int viewportOy=0)
Method determines the viewport size, which is used in the render target.
void UploadTextureImage(BIAS::ImageBase &img)
Some textures will certainly be created internally.
virtual void Destroy()
Uninitializes the rendering context.
const std::string & GetMessageString() const
Returns the description of the error including the file name and line number where the error occured...
void Execute()
Configures GL and issues a "rendering" on the GPU.
void CheckComplete() const
Checks whether the framebuffer object is supported in its current state.
unsigned int GetHeight() const
GLX pbuffer rendering context.
virtual void Init(const glfRenderingContextConfig &config)
Initializes the rendering context with the given configuration.
This class Param provides generic support for parameters.
void Init(TemplateSpecializedBatch::ProcessingScheme ps)
This method initializes all necessary GL structures.
void SetRenderTarget(BIAS::glfRenderTarget *rt)
Method determines where the results are delivered.
void Set(GLenum minFilter=GL_NEAREST, GLenum magFilter=GL_NEAREST, GLenum wrapS=GL_CLAMP, GLenum wrapT=GL_CLAMP, GLint textureNr=GL_TEXTURE0)
Convenience wrapper.
void ClearColorBuffer(float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=0.0f)
Clears the color buffer of the render target with the given color.
std::string * AddParamString(const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW)
Configuration for a rendering context.
void Create()
Creates the framebuffer object.