本文整理汇总了C++中ofShortPixels类的典型用法代码示例。如果您正苦于以下问题:C++ ofShortPixels类的具体用法?C++ ofShortPixels怎么用?C++ ofShortPixels使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ofShortPixels类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ofGetGlInternalFormat
//---------------------------------
int ofGetGlInternalFormat(const ofShortPixels& pix) {
#ifndef TARGET_OPENGLES
switch(pix.getNumChannels()) {
case 3: return GL_RGB16;
case 4: return GL_RGBA16;
default: return GL_LUMINANCE16;
}
#else
ofLogWarning()<< "16bit textures not supported in GLES";
switch(pix.getNumChannels()) {
case 3: return GL_RGB;
case 4: return GL_RGBA;
default: return GL_LUMINANCE;
}
#endif
}
开发者ID:Akzwar,项目名称:Projects_backup,代码行数:17,代码来源:ofTexture.cpp
示例2: loadData
//----------------------------------------------------------
void ofTexture::loadData(const ofShortPixels & pix, int glFormat){
if(!isAllocated()){
allocate(pix.getWidth(), pix.getHeight(), ofGetGlInternalFormat(pix), ofGetUsingArbTex(), glFormat, ofGetGlType(pix));
}
ofSetPixelStoreiAlignment(GL_UNPACK_ALIGNMENT,pix.getWidth(),pix.getBytesPerChannel(),ofGetNumChannelsFromGLFormat(glFormat));
loadData(pix.getData(), pix.getWidth(), pix.getHeight(), glFormat, ofGetGlType(pix));
}
开发者ID:jvcleave,项目名称:compare,代码行数:8,代码来源:ofTexture.cpp
示例3: getFreeImageType
FREE_IMAGE_TYPE getFreeImageType(const ofShortPixels& pix) {
switch(pix.getNumChannels()) {
case 1: return FIT_UINT16;
case 3: return FIT_RGB16;
case 4: return FIT_RGBA16;
default:
ofLogError("ofImage") << "getFreeImageType(): unknown FreeImage type for number of channels:" << pix.getNumChannels();
return FIT_UNKNOWN;
}
}
开发者ID:BaptisteTheoriz,项目名称:openFrameworks,代码行数:10,代码来源:ofImage.cpp
示例4:
void ofxDepthImageCompressor::convertTo8BitImage(ofShortPixels& pix, ofImage& image){
convertTo8BitImage(pix.getPixels(), image);
}
开发者ID:CLOUDS-Interactive-Documentary,项目名称:ofxRGBDepth,代码行数:3,代码来源:ofxDepthImageCompressor.cpp
示例5: readCompressedPng
void ofxDepthImageCompressor::readCompressedPng(string filename, ofShortPixels& pix){
if(!pix.isAllocated()){
pix.allocate(640, 480, 1);
}
readCompressedPng(filename, pix.getPixels());
}
开发者ID:CLOUDS-Interactive-Documentary,项目名称:ofxRGBDepth,代码行数:6,代码来源:ofxDepthImageCompressor.cpp
示例6: loadData
void ofxTexture3d::loadData(ofShortPixels & pix, int d, int xOffset, int yOffset, int zOffset)
{
loadData(pix.getData(), pix.getWidth(), pix.getHeight(), d, xOffset, yOffset, zOffset, ofGetGlFormat(pix));
}
开发者ID:timscaffidi,项目名称:ofxVolumetrics,代码行数:4,代码来源:ofxTexture3d.cpp
示例7: loadData
//----------------------------------------------------------
void ofTexture::loadData(const ofShortPixels & pix, int glFormat){
ofSetPixelStorei(pix.getWidth(),pix.getBytesPerChannel(),ofGetNumChannelsFromGLFormat(glFormat));
loadData(pix.getPixels(), pix.getWidth(), pix.getHeight(), glFormat, ofGetGlType(pix));
}
开发者ID:Robertoq7,项目名称:openFrameworks,代码行数:5,代码来源:ofTexture.cpp
示例8: allocate
//----------------------------------------------------------
void ofTexture::allocate(const ofShortPixels& pix, bool bUseARBExtention){
allocate(pix.getWidth(), pix.getHeight(), ofGetGlInternalFormat(pix), bUseARBExtention, ofGetGlFormat(pix), ofGetGlType(pix));
}
开发者ID:Robertoq7,项目名称:openFrameworks,代码行数:4,代码来源:ofTexture.cpp
示例9: addImage
bool ofxDepthImageRecorder::addImage(ofShortPixels& image){
return addImage(image.getPixels());
}
开发者ID:usm916,项目名称:ofxRGBDepth,代码行数:3,代码来源:ofxDepthImageRecorder.cpp
示例10: loadData
//----------------------------------------------------------
void ofTexture::loadData(const ofShortPixels & pix){
loadData(pix.getPixels(), pix.getWidth(), pix.getHeight(), ofGetGlFormat(pix));
}
开发者ID:3snail,项目名称:openFrameworks,代码行数:4,代码来源:ofTexture.cpp
示例11: loadData
//----------------------------------------------------------
void ofTexture::loadData(const ofShortPixels & pix, int glFormat){
ofSetPixelStoreiAlignment(GL_UNPACK_ALIGNMENT,pix.getWidth(),pix.getBytesPerChannel(),ofGetNumChannelsFromGLFormat(glFormat));
loadData(pix.getData(), pix.getWidth(), pix.getHeight(), glFormat, ofGetGlType(pix));
}
开发者ID:Bolvangar,项目名称:openFrameworks,代码行数:5,代码来源:ofTexture.cpp
注:本文中的ofShortPixels类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论