Git Product home page Git Product logo

gk-of's Introduction

00_myOf

00-version:of_v0.11.2_vs2017_release

01-Add projectGenerator shortcut-link to your startup menu [C:\Users---\AppData\Roaming\Microsoft\Windows\Start Menu\Programs]

02-You should include ofxGKUtils.h into your project when you use and run a program in this repository.

03-ADDONS LIST that You have to download and put into addon folder manually.

  • ofxBullet
  • ofxGuiExtended
  • ofxBox2D
  • ofxPostProcessing

04-CHANGES LIST that you have to modify your exsiting addons by yourself

//--------------------------------------------------------------------

  • To ofEasyCam.h public: /// ADDED BY GAISHI KUDO void setScrollFlip(const bool& _bool);

private: /// ADDED BY GAISHI KUDO int IsScrollFlipped; //-1 = true

  • To ofEasyCam.cpp constructor(){ /// ADDED BY GAISHI KUDO IsScrollFlipped = 1; //false } void ofEasyCam::setScrollFlip(const bool& _bool) { if (_bool)IsScrollFlipped = -1; if (!_bool)IsScrollFlipped = 1; } inside void ofEasyCam::mouseScrolled(ofMouseEventArgs & mouse): BEFORE: translate.z = mouse.scrollY * 30 * sensitivityTranslate.z * (getDistance() + std::numeric_limits::epsilon())/ area.height; AFTER: translate.z = IsScrollFlipped * mouse.scrollY * 30 * sensitivityTranslate.z * (getDistance() + std::numeric_limits::epsilon())/ area.height;

inside void ofEasyCam::mouseReleased(ofMouseEventArgs & mouse): BEFORE: reset(); AFTER: //reset();

//--------------------------------------------------------------------

gk-of's People

Contributors

ihsiag avatar

Watchers

 avatar

gk-of's Issues

アンチエイリアス

http://blog.rettuce.com/of/of-anti-aliasing/

地味にずっと悩んでた事をひがさんに教えてもらったので備忘録メモ。

oFでのアンチエイリアスっていうと
ofEnableSmoothing();
辺りを使えばいいんですよねとなるのだけど、
いや全然綺麗になんない。。みたいなことが常で、これまではいろいろぐぐった結果、
main.cpp の ofSetupOpenGL に ofAppGlutWindow とか ofAppGLFWWindow を渡してやって、
そいつにsample数を指定してやることでアンチエイリアス効かせてたんだけど今回は全然効かず。。なぜ。。

#include "ofAppGLFWWindow.h"
#include "ofAppGlutWindow.h"

int main(int argc, const char** argv)
{
ofAppGLFWWindow window;
window.setNumSamples(4);
// or
// ofAppGlutWindow window;
// window.setGlutDisplayString("rgba double depth alpha samples>=4");
ofSetupOpenGL(&window, 1280, 720, OF_WINDOW);
ofRunApp(new ofApp);
return 0;
}
openGLのglHintとか使っても今回は全然ダメ。。

んでひがさんに質問してみたらFbo使ってね?FboにはFboのsample数がsettingsにあるよーと。
なるほど!
んで見てみると、一番最後にありますね。

struct Settings {
int width; // width of images attached to fbo
int height; // height of images attached to fbo
int numColorbuffers; // how many color buffers to create
vector colorFormats; // format of the color attachments for MRT.
bool useDepth; // whether to use depth buffer or not
bool useStencil; // whether to use stencil buffer or not
bool depthStencilAsTexture; // use a texture instead of a renderbuffer for depth (useful to draw it or use it in a shader later)
GLenum textureTarget; // GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB
GLint internalformat; // GL_RGBA, GL_RGBA16F_ARB, GL_RGBA32F_ARB, GL_LUMINANCE32F_ARB etc.
GLint depthStencilInternalFormat; // GL_DEPTH_COMPONENT(16/24/32)
int wrapModeHorizontal; // GL_REPEAT, GL_MIRRORED_REPEAT, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER etc.
int wrapModeVertical; // GL_REPEAT, GL_MIRRORED_REPEAT, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER etc.
int minFilter; // GL_NEAREST, GL_LINEAR etc.
int maxFilter; // GL_NEAREST, GL_LINEAR etc.
int numSamples; // number of samples for multisampling (set 0 to disable)

Settings();
bool operator!=(const Settings & other);

};
なのでallocate時にnumSamples指定したsettings渡しで行けました。
あと、ofFbo::allocateの第4引数がnumSamplesになってて、ここで設定してやればsettingsじゃなくてもいけました。

ofFbo::allocate(int width, int height, int internalformat, int numSamples)
FboのnumSamplesとノーマルの描画のnumSamplesは設定場所が違うってお話でした。
これでようやくいつでも綺麗に書ける。。

you

投稿者rettuce
投稿日:2014/11/06
カテゴリーopenFrameworks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.