当前位置: 首页>>代码示例>>C++>>正文


C++ ofShortPixels::getWidth方法代码示例

本文整理汇总了C++中ofShortPixels::getWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ ofShortPixels::getWidth方法的具体用法?C++ ofShortPixels::getWidth怎么用?C++ ofShortPixels::getWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ofShortPixels的用法示例。


在下文中一共展示了ofShortPixels::getWidth方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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

示例2: allocate

//----------------------------------------------------------
void ofTexture::allocate(const ofShortPixels& pix, bool bUseARBExtention){
	allocate(pix.getWidth(), pix.getHeight(), ofGetGlInternalFormat(pix), bUseARBExtention, ofGetGlFormat(pix), ofGetGlType(pix));
	if((pix.getPixelFormat()==OF_PIXELS_GRAY || pix.getPixelFormat()==OF_PIXELS_GRAY_ALPHA) && ofIsGLProgrammableRenderer()){
		setRGToRGBASwizzles(true);
	}
	loadData(pix);
}
开发者ID:jvcleave,项目名称:compare,代码行数:8,代码来源:ofTexture.cpp

示例3: readToPixels

//----------------------------------------------------------
void ofTexture::readToPixels(ofShortPixels & pixels) const {
#ifndef TARGET_OPENGLES
	pixels.allocate(texData.width,texData.height,ofGetImageTypeFromGLType(texData.glInternalFormat));
	ofSetPixelStoreiAlignment(GL_PACK_ALIGNMENT,pixels.getWidth(),pixels.getBytesPerChannel(),pixels.getNumChannels());
	glBindTexture(texData.textureTarget,texData.textureID);
	glGetTexImage(texData.textureTarget,0,ofGetGlFormat(pixels),GL_UNSIGNED_SHORT,pixels.getData());
	glBindTexture(texData.textureTarget,0);
#endif
}
开发者ID:jvcleave,项目名称:compare,代码行数:10,代码来源:ofTexture.cpp

示例4: cleanDepth

ofShortPixels ofApp::cleanDepth(ofShortPixels dirtyDepth, int numPasses) {
	ofShortPixels cleanedDepth;
	cleanedDepth.allocate(dirtyDepth.getWidth(), dirtyDepth.getHeight(), dirtyDepth.getImageType());
	depth_cleaner_ = new cv::rgbd::DepthCleaner(toCv(dirtyDepth).depth(), windowSize, cv::rgbd::DepthCleaner::DEPTH_CLEANER_NIL);
	
	depth_cleaner_->operator()(toCv(dirtyDepth), toCv(cleanedDepth));
	
	for(int i = 0; i < numPasses - 1; i++) {
		depth_cleaner_->operator()(toCv(cleanedDepth), toCv(cleanedDepth));
	}
	
	return cleanedDepth;
}
开发者ID:flair2005,项目名称:OpenCV3_RGBD,代码行数:13,代码来源:ofApp.cpp

示例5: 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

示例6: 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

示例7: 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

示例8: loadData

//----------------------------------------------------------
void ofTexture::loadData(const ofShortPixels & pix){
	loadData(pix.getPixels(), pix.getWidth(), pix.getHeight(), ofGetGlFormat(pix));
}
开发者ID:3snail,项目名称:openFrameworks,代码行数:4,代码来源:ofTexture.cpp

示例9: 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::getWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。